Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Connections = make(map[string]*ConnectedClient)
Functions ¶
This section is empty.
Types ¶
type CleanableConnection ¶
type CleanableConnection interface { GetConnection() io.ReadWriteCloser CleanUp(uid string) error }
type ConnectedClient ¶
type ConnectedClient struct {
// contains filtered or unexported fields
}
func NewConnection ¶
func NewConnection(uid string, conn CleanableConnection) *ConnectedClient
creates new connected client and registers in connections lookup map
func (*ConnectedClient) Close ¶
func (c *ConnectedClient) Close()
type WebsocketIO ¶
type WebsocketIO interface { WriteMessage(c *CleanableConnection, b []byte) error ReadMessage(c *CleanableConnection) ([]byte, error) }
var Server WebsocketIO
make websocket io funcs mockable
Click to show internal directories.
Click to hide internal directories.