server

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapperedGRPCWebServe

func WrapperedGRPCWebServe(sfu *sfu.SFU, addr, cert, key string) error

Types

type Code

type Code int32
const (
	Ok                     Code = 200
	BadRequest             Code = 400
	Forbidden              Code = 403
	NotFound               Code = 404
	RequestTimeout         Code = 408
	UnsupportedMediaType   Code = 415
	BusyHere               Code = 486
	TemporarilyUnavailable Code = 480
	InternalError          Code = 500
	NotImplemented         Code = 501
	ServiceUnavailable     Code = 503
)

type SFUServer

type SFUServer struct {
	rtc.UnimplementedRTCServer
	sync.Mutex
	SFU *sfu.SFU
	// contains filtered or unexported fields
}

func NewSFUServer

func NewSFUServer(sfu *sfu.SFU) *SFUServer

func (*SFUServer) BroadcastTrackEvent

func (s *SFUServer) BroadcastTrackEvent(uid string, tracks []*rtc.TrackInfo, state rtc.TrackEvent_State)

func (*SFUServer) Signal

func (s *SFUServer) Signal(sig rtc.RTC_SignalServer) error

type WrapperedGRPCWebServer

type WrapperedGRPCWebServer struct {
	GRPCServer *grpc.Server
	// contains filtered or unexported fields
}

func NewWrapperedGRPCWebServer

func NewWrapperedGRPCWebServer(options WrapperedServerOptions, s *grpc.Server) *WrapperedGRPCWebServer

func (*WrapperedGRPCWebServer) Serve

func (s *WrapperedGRPCWebServer) Serve() error

type WrapperedServerOptions

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

func DefaultWrapperedServerOptions

func DefaultWrapperedServerOptions() WrapperedServerOptions

func NewWrapperedServerOptions

func NewWrapperedServerOptions(addr, cert, key string, websocket bool) WrapperedServerOptions

Jump to

Keyboard shortcuts

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