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: 0

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
rtp

Jump to

Keyboard shortcuts

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