Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Payload ¶
type Payload struct { Success bool `json:"success"` Type string `json:"type,omitempty"` Message string `json:"message,omitempty"` IPAddress string `json:"ip,omitempty"` Key string `json:"key,omitempty"` }
Payload lists the data exchanged
type WebsocketConn ¶
WebsocketConn provides convenience functions for sending and receiving data with websockets, using mutex to make sure only one writer/reader
func (*WebsocketConn) Close ¶
func (ws *WebsocketConn) Close() (err error)
func (*WebsocketConn) Receive ¶
func (ws *WebsocketConn) Receive() (p Payload, err error)
func (*WebsocketConn) Send ¶
func (ws *WebsocketConn) Send(p Payload) (err error)
Click to show internal directories.
Click to hide internal directories.