Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Configs = struct { DefaultRoomName string }{ DefaultRoomName: "main", }
Configs : configurations for `Hux`
View Source
var ErrRead error = errors.New("socket : read error ")
ErrRead : when a socket reads error except connection close
View Source
var ErrSocketConnection error = errors.New("connection : socket connection error")
ErrSocketConnection : Socket connection error
Functions ¶
This section is empty.
Types ¶
type Hub ¶
type Hub struct { Upgrader websocket.Upgrader DefaultRoom *Room // contains filtered or unexported fields }
Hub :
func (*Hub) GetRoom ¶
GetRoom : Returns a existing room. if it's not exist, creates and returns a new room
func (*Hub) InstantiateSocket ¶
InstantiateSocket :
type Room ¶
type Room struct {
// contains filtered or unexported fields
}
Room : a Room is a socket group
type Socket ¶
type Socket struct {
// contains filtered or unexported fields
}
Socket : Socket is a websocket conection handler
Click to show internal directories.
Click to hide internal directories.