Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GzipDecode ¶
Types ¶
type DisconnectCallback ¶
type Hub ¶
type Hub struct { Upgrader *websocket.Upgrader MaxReadSize int64 Peers map[*Peer]bool // client's map PeerRegister chan *Peer // channel that notify peer active PeerUnregister chan *Peer // channel that notify peer inactive ByteMessageChannel chan *HubByteMessage // message channel ObjectMessageChannel chan *HubObjectMessage // named object channel ExitChannel chan int Slot Slot }
func (*Hub) ConnectAndRun ¶
type HubByteMessage ¶
type HubObjectMessage ¶
type Peer ¶
type Slot ¶
type Slot interface { // peer message OnActive(*Peer) OnInactive(*Peer) OnRead(*Peer, []byte) // hub message OnHubByteMessage(*HubByteMessage) OnHubObjectMessage(*HubObjectMessage) }
Click to show internal directories.
Click to hide internal directories.