conn

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchSRFLX

func FetchSRFLX() ([]*webrtc.ICECandidate, error)

Types

type Session

type Session struct {
	Conn *webrtc.PeerConnection

	DataCh *webrtc.DataChannel

	DataChOpen chan struct{}

	Ctx       context.Context
	CtxCancel context.CancelFunc

	MsgCh          chan *webrtc.DataChannelMessage
	Candidates     []webrtc.ICECandidateInit
	CandidatesLock sync.Mutex
	GatherDone     chan struct{}
}

func New

func New() *Session

func (*Session) AddCandidates added in v0.0.8

func (c *Session) AddCandidates(candidates []webrtc.ICECandidateInit)

func (*Session) CandidatesHandler added in v0.0.8

func (c *Session) CandidatesHandler()

func (*Session) DataChHandler

func (c *Session) DataChHandler(ch *webrtc.DataChannel)

func (*Session) PeerInfoStr

func (c *Session) PeerInfoStr() (string, error)

func (*Session) ReceiveMessage added in v0.0.8

func (c *Session) ReceiveMessage(timeout time.Duration) ([]byte, error)

func (*Session) SetupPeerConn

func (c *Session) SetupPeerConn() error

func (*Session) WaitGatherComplete added in v0.0.8

func (c *Session) WaitGatherComplete()

Jump to

Keyboard shortcuts

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