dhwani_backend_p2p

package module
v0.0.0-...-5369d58 Latest Latest
Warning

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

Go to latest
Published: May 2, 2022 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const SERVER_HOST = "dhwani-backend.gurupras.me"

Variables

This section is empty.

Functions

This section is empty.

Types

type ServerConn

type ServerConn struct {
	ServerConnection
	// contains filtered or unexported fields
}

func NewServerConnection

func NewServerConnection(id string, autoReconnect bool) (*ServerConn, error)

func (*ServerConn) Close

func (s *ServerConn) Close() error

func (*ServerConn) Loop

func (s *ServerConn) Loop()

func (*ServerConn) OnSignal

func (s *ServerConn) OnSignal(cb func(SignalPacket)) func()

func (*ServerConn) Stop

func (s *ServerConn) Stop()

type ServerConnection

type ServerConnection interface {
	ReadMessage() (int, []byte, error)
	WriteMessage(int, []byte) error
	Close() error
}

type SignalPacket

type SignalPacket struct {
	From string `json:"from"`
	To   string `json:"to"`
	Type string `json:"type"`
	Data string `json:"data"`
}

Directories

Path Synopsis
cmd/test-opus command
cmd
media-peer command
rtp

Jump to

Keyboard shortcuts

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