transport

package
v0.0.0-...-d2dfa33 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2016 License: MIT Imports: 6 Imported by: 0

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

func WebsocketServer(m Server) func(*websocket.Conn)

Types

type InternalConnection

type InternalConnection struct {
	Channel chan<- protocol.Message
}

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

func (InternalConnection) Send

func (i InternalConnection) Send(msgs []protocol.Message) error

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

func (*LongPollingConnection) Send

func (lp *LongPollingConnection) Send(msgs []protocol.Message) error

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

func (*WebSocketConnection) Send

func (wc *WebSocketConnection) Send(msgs []protocol.Message) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL