Documentation ¶
Overview ¶
Package webrtc contains the webmesh WebRTC service.
Package webrtc contains the webmesh WebRTC service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSTUNServers = []string{
"stun:stun.l.google.com:19302",
}
DefaultSTUNServers are the default STUN servers to use.
Functions ¶
This section is empty.
Types ¶
type DHTOptions ¶ added in v0.4.0
type DHTOptions struct { // RendevousStrings is a map of peer IDs to rendezvous strings // for allowing signaling through libp2p. RendezvousStrings map[string]string // BootstrapServers is a list of bootstrap servers to use for the DHT. // If empty or nil, the default bootstrap servers will be used. BootstrapServers []multiaddr.Multiaddr // LocalAddrs is a list of local addresses to announce to the discovery service. // If empty, the default local addresses will be used. LocalAddrs []multiaddr.Multiaddr // AnnounceTTL is the TTL for each announcement. AnnounceTTL time.Duration // STUNServers is a list of STUN servers to use for NAT traversal. // If empty, the default STUN servers will be used. STUNServers []string // WireGuardPort is the port to use for connections targeting WireGuard. WireGuardPort int // ConnectTimeout is the timeout for connecting to a peer. ConnectTimeout time.Duration }
DHTOptions are options for the DHTServer.
type DHTServer ¶ added in v0.4.0
type DHTServer struct { DHTOptions // contains filtered or unexported fields }
DHTServer is the webmesh DHT service.
func NewDHTServer ¶ added in v0.4.0
func NewDHTServer(opts DHTOptions) *DHTServer
NewDHTServer returns a new DHTServer.
func (*DHTServer) ListenAndServe ¶ added in v0.4.0
ListenAndServe starts the server and blocks until the server exits.
type Options ¶ added in v0.3.0
type Options struct { ID string Storage storage.MeshStorage Wireguard wireguard.Interface NodeDialer transport.NodeDialer RBAC rbac.Evaluator STUNServers []string }
Options are options for the WebRTC service.
type Server ¶
type Server struct { v1.UnimplementedWebRTCServer // contains filtered or unexported fields }
Server is the webmesh WebRTC service.
func (*Server) StartDataChannel ¶
func (s *Server) StartDataChannel(stream v1.WebRTC_StartDataChannelServer) error
Click to show internal directories.
Click to hide internal directories.