Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnswerContent ¶ added in v1.0.2
type DisconnectContent ¶ added in v1.0.2
type DisconnectContent struct {
NotifyAll string `json:"notifyAll"`
}
type DisconnectionNotificationContent ¶ added in v1.0.9
type DisconnectionNotificationContent struct {
DisconnectedPeerID string `json:"disconnectedPeerID"`
}
type GetAllPeerIDsContent ¶ added in v1.0.2
type GetAllPeerIDsContent struct {
PeersIDs []string `json:"peersIDs"`
}
type ICECandidateContent ¶ added in v1.0.2
type IdentifySelfContent ¶ added in v1.0.5
type IdentifySelfContent struct {
ID string `json:"id"`
}
type Message ¶
type Message struct {
Kind MessageType `json:"kind"`
Reach ReachType `json:"reach"`
Sender string `json:"sender"`
PeerID string `json:"peerID"`
Content json.RawMessage `json:"content"`
}
func (*Message) UnmarshalContent ¶ added in v1.0.2
type MessageType ¶
type MessageType int
const ( GetAllPeerIDs MessageType = iota TextMessage Disconnect Offer // webrtc specific Answer // webrtc specific ICECandidate // webrtc specific IdentifySelf DisconnectionNotification End )
func (MessageType) MarshalJSON ¶
func (m MessageType) MarshalJSON() ([]byte, error)
func (*MessageType) UnmarshalJSON ¶
func (m *MessageType) UnmarshalJSON(data []byte) error
type OfferContent ¶ added in v1.0.2
type ReachType ¶ added in v1.0.2
type ReachType int
func (ReachType) MarshalJSON ¶ added in v1.0.2
func (*ReachType) UnmarshalJSON ¶ added in v1.0.2
type TextMessageContent ¶ added in v1.0.2
Click to show internal directories.
Click to hide internal directories.