v1.2.0
Improvements to the Sock and WebSocketServer API:
-
WebSocketServer now uses a WebSocket struct type instead of Sock; a specialized derivative of Sock with methods for accessing the underlying web socket and http connection.
-
Adds new callback WebSocketServer.OnConnect, deprecating OnAccept. OnConnect receives a WebSocket struct rather than a Sock struct as is the case with OnAccept (i.e. why OnConnect was added instead of using OnAccept.)
-
Adds method Sock.String() which returns a name that uniquely identifies the socket during its lifetime. Useful for logging.
-
Deprecates the function WebSocketHandler() in favor for a better-named NewWebSocketServer(). Functionality is unchanged.