diff options
Diffstat (limited to 'vendor/golang.org/x/net/websocket')
-rw-r--r-- | vendor/golang.org/x/net/websocket/websocket.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/vendor/golang.org/x/net/websocket/websocket.go b/vendor/golang.org/x/net/websocket/websocket.go index e242c89a..1f4f7be4 100644 --- a/vendor/golang.org/x/net/websocket/websocket.go +++ b/vendor/golang.org/x/net/websocket/websocket.go @@ -241,7 +241,10 @@ func (ws *Conn) Close() error { return err1 } +// IsClientConn reports whether ws is a client-side connection. func (ws *Conn) IsClientConn() bool { return ws.request == nil } + +// IsServerConn reports whether ws is a server-side connection. func (ws *Conn) IsServerConn() bool { return ws.request != nil } // LocalAddr returns the WebSocket Origin for the connection for client, or |