server

package
v0.0.2-0...-f40c1fc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiscoServer

type DiscoServer struct {
	// contains filtered or unexported fields
}

DiscoServer is a peer-discovery and webrtc-signaling service for Babble. Peer-discovery enables users to advertise groups that other people can join and is exposed over a regular HTTP REST API. WebRTC-signaling enables users to exchange connection metadata (SDP) to create direct p2p connections, and relies on the WAMP protocol which is basically RPC over web-sockets.

func NewDiscoServer

func NewDiscoServer(
	repo group.GroupRepository,
	certFile string,
	keyFile string,
	logger *logrus.Entry,
) *DiscoServer

NewDiscoServer instantiates a new DiscoServer with a GroupRepository.

func (*DiscoServer) Serve

func (s *DiscoServer) Serve(
	discoAddr string,
	signalAddr string,
	turnAddr string,
	turnUsername string,
	turnPassword string,
	realm string,
	ttl time.Duration,
	ttlHearbeat time.Duration)

Serve starts the peer-discovery, signaling, and TURN servers.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL