Documentation
¶
Index ¶
Constants ¶
View Source
const ( MessageTypeOpen = iota // message with connection options MessageTypeClose // close connection and destroy all handle routines MessageTypePing // ping request message MessageTypePong // pong response message MessageTypeEmpty // empty message MessageTypeEmit // emit request, no response MessageTypeAckRequest // emit request, wait for response (ack) MessageTypeAckResponse // ack response MessageTypeUpgrade // upgrade message MessageTypeBlank // blank message )
View Source
const ( MessageOpen = "0" MessageClose = "1" MessagePing = "2" MessagePingProbe = "2probe" MessagePongProbe = "3probe" MessagePong = "3" MessageEmpty = "40" MessageUpgrade = "5" MessageBlank = "6" MessageStub = "stub" )
Variables ¶
View Source
var ( ErrorWrongMessageType = errors.New("wrong message type") ErrorWrongPacket = errors.New("wrong packet") )
Functions ¶
func MustEncode ¶
MustEncode the message m acts like Encode but panics on error
Types ¶
Click to show internal directories.
Click to hide internal directories.