Documentation ¶
Overview ¶
Package socket creates and manages Sockets from the client Each 'Socket' represents a single Socket on the client, and has its own websocket connection
Index ¶
- type Socket
- func (w *Socket) Close() error
- func (w *Socket) CloseChan() chan bool
- func (w *Socket) ConfigChan() chan types.ClientMessage
- func (w *Socket) Read()
- func (w *Socket) RemoteAddr() net.Addr
- func (w *Socket) Send(msg interface{})
- func (w *Socket) SendErrorMessage(err error)
- func (w *Socket) SendSuccess(msg interface{}, position types.Position)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Socket ¶
type Socket struct {
// contains filtered or unexported fields
}
Socket struct for a single frontend Socket
func Create ¶
func Create(configChan chan types.ClientMessage, conn *websocket.Conn) *Socket
Create creates a new Socket, with a valid api attached
func (*Socket) ConfigChan ¶
func (w *Socket) ConfigChan() chan types.ClientMessage
func (*Socket) RemoteAddr ¶
func (*Socket) SendErrorMessage ¶
SendErrorMessage sends the error message
func (*Socket) SendSuccess ¶
SendSuccess sends a success message
Click to show internal directories.
Click to hide internal directories.