From bf58fc49e5a08df68b05a2fc59cfba868ad40894 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Thu, 26 Apr 2018 23:02:10 +0200 Subject: [PATCH] added sockets to ws.Client and ws.Server --- ws/types.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ws/types.go b/ws/types.go index 90f5f00..9159ac8 100644 --- a/ws/types.go +++ b/ws/types.go @@ -1,6 +1,7 @@ package ws import ( + "net" "git.xdrm.io/gws/internal/uri/parser" "git.xdrm.io/gws/ws/frame" ) @@ -17,6 +18,7 @@ type Controller struct { // Represents a websocket srever type Server struct { + soc net.Listener // listen socket adr []byte // server listening ip/host prt uint16 // server listening port @@ -26,6 +28,7 @@ type Server struct { // Represents a websocket client type Client struct { + soc net.Conn // communication socket pro string // choosen protocol (Sec-WebSocket-Protocol) arg [][]string // URI parameters, index 0 is full URI, then matching groups dat interface{} // store (for client implementation-specific data)