server

package
v1.10.8 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SFUServer

type SFUServer struct {
	pb.UnimplementedSFUServer
	sync.Mutex
	SFU *sfu.SFU
}

func NewServer

func NewServer(sfu *sfu.SFU) *SFUServer

func (*SFUServer) Signal

func (s *SFUServer) Signal(stream pb.SFU_SignalServer) error

Publish a stream to the sfu. Publish creates a bidirectional streaming rpc connection between the client and sfu.

The sfu will respond with a message containing the stream pid and one of two different payload types: 1. `Connect` containing the session answer description. This message is *always* returned first. 2. `Trickle` containing candidate information for Trickle ICE.

If the webrtc connection is closed, the server will close this stream.

The client should send a message containing the session id and one of two different payload types: 1. `Connect` containing the session offer description. This message must *always* be sent first. 2. `Trickle` containing candidate information for Trickle ICE.

If the client closes this stream, the webrtc stream will be closed.

type WrapperedGRPCWebServer

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

func NewWrapperedGRPCWebServer

func NewWrapperedGRPCWebServer(options WrapperedServerOptions, sfu *sfu.SFU) *WrapperedGRPCWebServer

func (*WrapperedGRPCWebServer) Serve

func (s *WrapperedGRPCWebServer) Serve() error

type WrapperedServerOptions

type WrapperedServerOptions struct {
	Addr                  string
	EnableTLS             bool
	TLSAddr               string
	Cert                  string
	Key                   string
	AllowAllOrigins       bool
	AllowedOrigins        *[]string
	AllowedHeaders        *[]string
	UseWebSocket          bool
	WebsocketPingInterval time.Duration
}

func DefaultWrapperedServerOptions

func DefaultWrapperedServerOptions() WrapperedServerOptions

Jump to

Keyboard shortcuts

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