diff --git a/ws/types.go b/ws/types.go index 1216029..1a467e8 100644 --- a/ws/types.go +++ b/ws/types.go @@ -7,7 +7,7 @@ import ( ) // Represents a websocket controller callback function -type ControllerFunc func(Client, Frame) +type ControllerFunc func(*Client, *Frame) // Represents a websocket controller type Controller struct { @@ -21,6 +21,8 @@ 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 + + ctl *Controller // assigned controller Dat interface{} // store (for client implementation-specific data) }