Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var H = Hub{ Connections: make(map[domain.UserUid]*Connection), Register: make(chan struct { domain.UserUid *Connection }), Unregister: make(chan domain.UserUid), }
Functions ¶
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func (*Connection) Reader ¶
func (c *Connection) Reader()
func (*Connection) Writer ¶
func (c *Connection) Writer()
type Hub ¶
type Hub struct { Connections map[domain.UserUid]*Connection Register chan struct { domain.UserUid *Connection } Unregister chan domain.UserUid }
func (*Hub) MessagePublish ¶
func (*Hub) UsersOnline ¶
Returns a list of users that are currently online
Click to show internal directories.
Click to hide internal directories.