Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
BINARY_HEADER = []byte{0x36}
)
Functions ¶
func Transports ¶
func Transports() map[string]*transports
Types ¶
type Jsonp ¶
type Jsonp interface {
Polling
}
func NewJSONP ¶
func NewJSONP(ctx *types.HttpContext) Jsonp
type Polling ¶
type Polling interface {
Transport
DoWrite(*types.HttpContext, _types.BufferInterface, *packet.Options, func(*types.HttpContext))
}
func NewPolling ¶
func NewPolling(ctx *types.HttpContext) Polling
type Transport ¶
type Transport interface {
events.EventEmitter
Prototype(Transport)
Proto() Transport
SetSid(string)
SetWritable(bool)
SetReq(*types.HttpContext)
SetSupportsBinary(bool)
SetReadyState(string)
SetHttpCompression(*types.HttpCompression)
SetPerMessageDeflate(*types.PerMessageDeflate)
SetMaxHttpBufferSize(int64)
Sid() string
Writable() bool
Protocol() int
// @protected
Discarded() bool
// @protected
Parser() parser.Parser
// @protected
Req() *types.HttpContext
// @protected
SupportsBinary() bool
ReadyState() string
HttpCompression() *types.HttpCompression
PerMessageDeflate() *types.PerMessageDeflate
MaxHttpBufferSize() int64
// @abstract
HandlesUpgrades() bool
// @abstract
SupportsFraming() bool
// @abstract
Name() string
// Construct() should be called after calling Prototype()
Construct(*types.HttpContext)
// @private
// Flags the transport as discarded.
Discard()
// @protected
// Called with an incoming HTTP request.
OnRequest(*types.HttpContext)
// @private
// Closes the transport.
Close(...types.Callable)
// @protected
// Called with a transport error.
OnError(string, error)
// @protected
// Called with parsed out a packets from the data stream.
OnPacket(*packet.Packet)
// @protected
// Called with the encoded packet data.
OnData(_types.BufferInterface)
// @protected
// Called upon transport close.
OnClose()
// @protected
// @abstract
// Writes a packet payload.
Send([]*packet.Packet)
// @protected
// @abstract
// Closes the transport.
DoClose(types.Callable)
}
func MakeTransport ¶
func MakeTransport() Transport
func NewTransport ¶
func NewTransport(ctx *types.HttpContext) Transport
type WebTransport ¶
type WebTransport interface {
Transport
}
func NewWebTransport ¶
func NewWebTransport(ctx *types.HttpContext) WebTransport
type Websocket ¶
type Websocket interface {
Transport
}
func NewWebSocket ¶
func NewWebSocket(ctx *types.HttpContext) Websocket
Click to show internal directories.
Click to hide internal directories.