Documentation ¶
Overview ¶
Package websockets manages active websocket connections and messages received from and sent to them.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Clients = ClientMap{ // contains filtered or unexported fields }
Clients stores all synchronised websocket clients in a theread-safe map
Functions ¶
func CheckOrigin ¶
CheckOrigin asserts the client matches the origin specified by the server or has none.
Types ¶
type Client ¶
type Client struct { // Client identity information auth.Ident // contains filtered or unexported fields }
Client stores and manages a websocket-connected remote client and its interaction with the server and database
type ClientMap ¶
ClientMap is a thread-safe store for all clients connected to this server instance
func (*ClientMap) ChangeSync ¶
ChangeSync changes the thread or board ID the client is synchronised to
func (*ClientMap) CountByIP ¶
CountByIP returns the number of unique IPs synchronised with the server
Click to show internal directories.
Click to hide internal directories.