Documentation
¶
Index ¶
- Variables
- type ACLHook
- type AuthHook
- func (h *AuthHook) ID() string
- func (h *AuthHook) OnConnect(cl *mqtt.Client, pk packets.Packet) error
- func (h *AuthHook) OnConnectAuthenticate(cl *mqtt.Client, pk packets.Packet) bool
- func (h *AuthHook) OnDisconnect(cl *mqtt.Client, err error, expire bool)
- func (h *AuthHook) OnPublish(cl *mqtt.Client, pk packets.Packet) (packets.Packet, error)
- func (h *AuthHook) OnSubscribe(cl *mqtt.Client, pk packets.Packet) packets.Packet
- func (h *AuthHook) OnUnsubscribe(cl *mqtt.Client, pk packets.Packet) packets.Packet
- func (h *AuthHook) Provides(b byte) bool
- type Broker
- func (b *Broker) EstablishConnection(listenerID string, conn net.Conn) error
- func (b *Broker) HasConnectedClient(userID string) bool
- func (b *Broker) PublishSignaling(userID, clientID string, payload []byte)
- func (b *Broker) SetTLSConfig(tlsConfig *tls.Config)
- func (b *Broker) Start() error
- func (b *Broker) Stop() error
- type ConnectionHook
- type NotificationHub
- type SignalingMessage
- type WsConn
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidMessage = errors.New("message type not binary")
Functions ¶
This section is empty.
Types ¶
type ACLHook ¶
func (*ACLHook) OnACLCheck ¶
type AuthHook ¶
func (*AuthHook) OnConnectAuthenticate ¶
func (*AuthHook) OnDisconnect ¶
func (*AuthHook) OnSubscribe ¶
func (*AuthHook) OnUnsubscribe ¶
type Broker ¶
type Broker struct {
RoomManager *screenshare.RoomManager
// contains filtered or unexported fields
}
func NewBroker ¶
func NewBroker(port string, tlsConfig *tls.Config, validateToken func(token string) (string, error), iceServers []interface{}, roomManager *screenshare.RoomManager, hub NotificationHub) *Broker
func (*Broker) EstablishConnection ¶ added in v0.0.30
func (*Broker) HasConnectedClient ¶ added in v0.0.30
func (*Broker) PublishSignaling ¶ added in v0.0.30
func (*Broker) SetTLSConfig ¶ added in v0.0.30
type ConnectionHook ¶
func (*ConnectionHook) ID ¶
func (h *ConnectionHook) ID() string
func (*ConnectionHook) OnDisconnect ¶
func (h *ConnectionHook) OnDisconnect(cl *mqtt.Client, err error, expire bool)
func (*ConnectionHook) OnPacketRead ¶
func (*ConnectionHook) Provides ¶
func (h *ConnectionHook) Provides(b byte) bool
type NotificationHub ¶ added in v0.0.30
type NotificationHub interface {
}
type SignalingMessage ¶
type SignalingMessage struct {
Type string `json:"type"`
Room string `json:"room"`
RoomId string `json:"roomId"`
UserData string `json:"userdata"`
AccessCodes []string `json:"accessCodes"`
ClientId string `json:"clientId"`
Payload map[string]interface{} `json:"payload"`
IceServers map[string]interface{} `json:"iceServers"`
}
Click to show internal directories.
Click to hide internal directories.