Documentation ¶
Index ¶
Constants ¶
View Source
const LongPollingConnectionPriority = 1
View Source
const WebSocketConnectionPriority = 10
Variables ¶
This section is empty.
Functions ¶
func MakeLongPoll ¶
func MakeLongPoll(msgs interface{}, server Server, w http.ResponseWriter)
func WebsocketServer ¶
Types ¶
type InternalConnection ¶
func (InternalConnection) Close ¶
func (i InternalConnection) Close()
func (InternalConnection) IsConnected ¶
func (i InternalConnection) IsConnected() bool
func (InternalConnection) IsSingleShot ¶
func (i InternalConnection) IsSingleShot() bool
func (InternalConnection) Priority ¶
func (i InternalConnection) Priority() int
type LongPollingConnection ¶
type LongPollingConnection struct { Closed bool // contains filtered or unexported fields }
func NewLongPollingConnection ¶
func NewLongPollingConnection() *LongPollingConnection
func (*LongPollingConnection) Close ¶
func (lp *LongPollingConnection) Close()
func (*LongPollingConnection) IsConnected ¶
func (lp *LongPollingConnection) IsConnected() bool
func (LongPollingConnection) IsSingleShot ¶
func (lp LongPollingConnection) IsSingleShot() bool
func (LongPollingConnection) Priority ¶
func (lp LongPollingConnection) Priority() int
type Server ¶
type Server interface { HandleRequest(interface{}, protocol.Connection) Logger() utils.Logger }
type WebSocketConnection ¶
type WebSocketConnection struct {
// contains filtered or unexported fields
}
func (*WebSocketConnection) Close ¶
func (wc *WebSocketConnection) Close()
func (*WebSocketConnection) IsConnected ¶
func (wc *WebSocketConnection) IsConnected() bool
func (WebSocketConnection) IsSingleShot ¶
func (lp WebSocketConnection) IsSingleShot() bool
func (WebSocketConnection) Priority ¶
func (wc WebSocketConnection) Priority() int
Click to show internal directories.
Click to hide internal directories.