Documentation ¶
Index ¶
- func MakeLongPoll(msgs interface{}, server Server, w http.ResponseWriter)
- func WebsocketServer(m Server) func(*websocket.Conn)
- type LongPollingConnection
- func (lp *LongPollingConnection) Close()
- func (lp *LongPollingConnection) IsConnected() bool
- func (lp *LongPollingConnection) IsSingleShot() bool
- func (lp *LongPollingConnection) Send(msgs []protocol.Message) error
- func (lp *LongPollingConnection) SendJsonp(msgs []protocol.Message, jsonp string) error
- type Server
- type WebSocketConnection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeLongPoll ¶
func MakeLongPoll(msgs interface{}, server Server, w http.ResponseWriter)
func WebsocketServer ¶
Types ¶
type LongPollingConnection ¶
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
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 (wc *WebSocketConnection) IsSingleShot() bool
Click to show internal directories.
Click to hide internal directories.