Documentation ¶
Overview ¶
Package backend provides various socket implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OnNewSocketConnection ¶
func OnNewSocketConnection(f func(BackendSocket))
OnNewSocketConnection sets the event function which is triggered if a new socket connection was made.
Types ¶
type BackendSocket ¶
type BackendSocket interface { Type() SocketType RemoteAddr() string UserAgent() string Close() IsClosed() bool OnClose(OnCloseFunc) WriteChan() chan string ReadChan() chan string }
type OnCloseFunc ¶
type OnCloseFunc func()
type SocketType ¶
type SocketType int
const ( // The available socket types. TypeAjaxSocket SocketType = 1 << iota TypeWebSocket SocketType = 1 << iota )
Click to show internal directories.
Click to hide internal directories.