Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func NewConnection ¶
func NewConnection(conn net.Conn) *Connection
type ConnectionManager ¶
type ConnectionManager struct {
// contains filtered or unexported fields
}
func NewConnectionManager ¶
func NewConnectionManager() *ConnectionManager
func (*ConnectionManager) AddClient ¶
func (cm *ConnectionManager) AddClient(conn *Connection)
func (*ConnectionManager) Broadcast ¶
func (cm *ConnectionManager) Broadcast(msg Message, sender *Connection)
func (*ConnectionManager) RemoveClient ¶
func (cm *ConnectionManager) RemoveClient(conn *Connection)
func (*ConnectionManager) Subscribe ¶
func (cm *ConnectionManager) Subscribe(conn *Connection, topic string)
type Message ¶
type Message struct { ID string `json:"id"` Topic string `json:"topic"` Payload json.RawMessage `json:"payload"` Sender *Connection `json:"-"` }
Click to show internal directories.
Click to hide internal directories.