added sockets to ws.Client and ws.Server
This commit is contained in:
parent
5e4341e3d9
commit
bf58fc49e5
|
@ -1,6 +1,7 @@
|
||||||
package ws
|
package ws
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"net"
|
||||||
"git.xdrm.io/gws/internal/uri/parser"
|
"git.xdrm.io/gws/internal/uri/parser"
|
||||||
"git.xdrm.io/gws/ws/frame"
|
"git.xdrm.io/gws/ws/frame"
|
||||||
)
|
)
|
||||||
|
@ -17,6 +18,7 @@ type Controller struct {
|
||||||
|
|
||||||
// Represents a websocket srever
|
// Represents a websocket srever
|
||||||
type Server struct {
|
type Server struct {
|
||||||
|
soc net.Listener // listen socket
|
||||||
adr []byte // server listening ip/host
|
adr []byte // server listening ip/host
|
||||||
prt uint16 // server listening port
|
prt uint16 // server listening port
|
||||||
|
|
||||||
|
@ -26,6 +28,7 @@ type Server struct {
|
||||||
|
|
||||||
// Represents a websocket client
|
// Represents a websocket client
|
||||||
type Client struct {
|
type Client struct {
|
||||||
|
soc net.Conn // communication socket
|
||||||
pro string // choosen protocol (Sec-WebSocket-Protocol)
|
pro string // choosen protocol (Sec-WebSocket-Protocol)
|
||||||
arg [][]string // URI parameters, index 0 is full URI, then matching groups
|
arg [][]string // URI parameters, index 0 is full URI, then matching groups
|
||||||
dat interface{} // store (for client implementation-specific data)
|
dat interface{} // store (for client implementation-specific data)
|
||||||
|
|
Loading…
Reference in New Issue