Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WebsocketClient ¶
type WebsocketClient struct {
Conn *websocket.Conn
StorageDriver storage.Driver
Client client.ClientMetadata
User models.User
InitialSync bool
// contains filtered or unexported fields
}
WebsocketClient contains the connection as well as metadata for a client Used by both the server and client This is mainly a transport layer connection
func (*WebsocketClient) Close ¶
func (c *WebsocketClient) Close(msg string)
Close will gracefully close the connection. If an error ocurrs during closing, it will be ignored. It will set the WebsocketClient as closed and will NOT send a CLose Message if the connection is closed already
func (*WebsocketClient) SendMessage ¶
func (c *WebsocketClient) SendMessage(message messages.WebsocketRequest) error
sendMessage enforces a uniform style in sending data
Click to show internal directories.
Click to hide internal directories.