golang-socketio/protocol/message.go

45 lines
624 B
Go
Raw Normal View History

2016-05-18 22:11:10 +02:00
package protocol
const (
/**
Message with connection options
*/
MessageTypeOpen = iota
/**
Close connection and destroy all handle routines
*/
MessageTypeClose = iota
/**
Ping request message
*/
MessageTypePing = iota
/**
Pong response message
*/
MessageTypePong = iota
/**
Empty message
*/
MessageTypeEmpty = iota
/**
Emit request, no response
*/
MessageTypeEmit = iota
/**
Emit request, wait for response (ack)
*/
MessageTypeAckRequest = iota
/**
ack response
*/
MessageTypeAckResponse = iota
)
type Message struct {
Type int
AckId int
Method string
Args string
Source string
}