#394·zinx

在 ws 连接时,如何绑定参数

作者: 1426919587创建于 2026年1月9日更新于 2026年5月4日

For example, when connecting to ws://your-server.com/ws?jwttoken=sjdkkl.jskj.sjkjk, I get the token through the query of the http request: query := req.URL.Query() token := query.Get("token") Then I bind the token to the current connection.