added sockets to ws.Client and ws.Server

This commit is contained in:
xdrm-brackets 2018-04-26 23:02:10 +02:00
parent 5e4341e3d9
commit bf58fc49e5
1 changed files with 3 additions and 0 deletions

View File

@ -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)