routes

package
v1.0.2-0...-2da3d3e Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPeerToPeerRoomHandler

func NewPeerToPeerRoomHandler(wss *wshandler.WSS) http.Handler

func NewPeerToServerRoomHandler

func NewPeerToServerRoomHandler(
	wss *wshandler.WSS,
	iceServers []config.ICEServer,
	sfuConfig config.NetworkConfigSFU,
	tracksManager TracksManager,
) http.Handler

Types

type AdapterFactory

type AdapterFactory func(room string) wsadapter.Adapter

type Mux

type Mux struct {
	BaseURL string
	// contains filtered or unexported fields
}

func NewMux

func NewMux(
	baseURL string,
	version string,
	network config.NetworkConfig,
	iceServers []config.ICEServer,
	rooms RoomManager,
	tracks TracksManager,
) *Mux

func (*Mux) ServeHTTP

func (mux *Mux) ServeHTTP(w http.ResponseWriter, r *http.Request)

type ReadyMessage

type ReadyMessage struct {
	UserID string `json:"userId"`
	Room   string `json:"room"`
}

type RoomManager

type RoomManager interface {
	Enter(room string) wsadapter.Adapter
	Exit(room string)
}

type TracksManager

type TracksManager interface {
	Add(room string, clientID string, peerConnection tracks.PeerConnection, signaller tracks.Signaller) (closeChannel <-chan struct{})
}

Jump to

Keyboard shortcuts

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