client

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2025 License: MIT Imports: 12 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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// config to pass to PeerConnection
	AgentCfg ice.AgentConfig
	// where to dial the signaling server
	SignalingServer url.URL
}

func DefaultConfig

func DefaultConfig(SignalingServerAddr, path string) Config

type Conn

type Conn struct {
	*ice.Conn
	// contains filtered or unexported fields
}

Conn implements net.PacketConn as well as net.Conn Although the message reliability depends on configuration. By default it's UDP hence it's unreliable

func (Conn) ReadFrom

func (conn Conn) ReadFrom(p []byte) (int, net.Addr, error)

func (Conn) WriteTo

func (conn Conn) WriteTo(p []byte, addr net.Addr) (int, error)

type Guest

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

func NewGuest

func NewGuest(ctx context.Context, roomID string, cfg Config) (guest *Guest, err error)

func (*Guest) CandidateListener

func (guest *Guest) CandidateListener(ctx context.Context)

listen for ice candidates over websocket

func (*Guest) Conn

func (guest *Guest) Conn() Conn

type Owner

type Owner struct {
	RoomID string
	// contains filtered or unexported fields
}

func NewOwner

func NewOwner(ctx context.Context, onConnect func(conn Conn), cfg Config) (owner *Owner, err error)

func (*Owner) Kick

func (owner *Owner) Kick(conn Conn)

Jump to

Keyboard shortcuts

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