Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionManager ¶
type ConnectionManager interface { // AddWSConnection registers a new WS connection AddWSConnection(id string, session *melody.Session) // RemoveWSConnection Removes the WS connection with the supplied ID RemoveWSConnection(id string) // GetWSConnection fetches a WS connection, if any, using the supplied ID GetWSConnection(id string) WSConnection }
ConnectionManager defines a connection manager interface for active WS connections
type WSConnection ¶
type WSConnection interface { // WriteData pushes out data to the WS connection. // Returns an error if the write failed (ex. connection closed) WriteData(data any) error }
WSConnection represents a single WS connection
Click to show internal directories.
Click to hide internal directories.