Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnswerStream ¶
AnswerStream is stream of responses to a discovery request.
type OfferStream ¶
OfferStream is a stream of discovery messages coming from other peers.
type Signal ¶
type Signal struct { UID string // optional user identifier to distinguish peers Data []byte // payload generated by WebRTC to establish connection }
Signal describes a message that will be sent via signalling channel to discover peers.
type Signalling ¶
type Signalling interface { // Broadcast sends a peer discovery request. Broadcast(s Signal) (AnswerStream, error) // Listen starts listening for incoming peer discovery requests. Listen(uid string) (OfferStream, error) }
Signalling is an interface for a signalling connection that helps to establish P2P connections.
Click to show internal directories.
Click to hide internal directories.