feat: server.Conn 支持通过 GetServer 获取到服务器实例
This commit is contained in:
parent
803dd4f2eb
commit
89e9c517af
|
@ -127,6 +127,11 @@ type connection struct {
|
||||||
mu sync.Mutex
|
mu sync.Mutex
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetServer 获取服务器
|
||||||
|
func (slf *Conn) GetServer() *Server {
|
||||||
|
return slf.server
|
||||||
|
}
|
||||||
|
|
||||||
// GetWebsocketRequest 获取websocket请求
|
// GetWebsocketRequest 获取websocket请求
|
||||||
func (slf *Conn) GetWebsocketRequest() *http.Request {
|
func (slf *Conn) GetWebsocketRequest() *http.Request {
|
||||||
return slf.GetData(wsRequestKey).(*http.Request)
|
return slf.GetData(wsRequestKey).(*http.Request)
|
||||||
|
|
Loading…
Reference in New Issue