conn

package
v0.0.0-...-377ab0e Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package conn defines interfaces for connections and tracks.

Index

Constants

This section is empty.

Variables

View Source
var ErrConnectionClosed = errors.New("connection is closed")

Functions

This section is empty.

Types

type Down

type Down interface {
}

Type Down represents a connection in the server to client direction.

type DownTrack

type DownTrack interface {
	Write(buf []byte) (int, error)
	SetTimeOffset(ntp uint64, rtp uint32)
	SetCname(string)
	GetMaxBitrate() (uint64, int, int)
}

Type DownTrack represents a track in the server to client direction.

type Up

type Up interface {
	AddLocal(Down) error
	DelLocal(Down) bool
	Id() string
	Label() string
	User() (string, string)
}

Type Up represents a connection in the client to server direction.

type UpTrack

type UpTrack interface {
	AddLocal(DownTrack) error
	DelLocal(DownTrack) bool
	Kind() webrtc.RTPCodecType
	Label() string
	Codec() webrtc.RTPCodecCapability
	// GetPacket fetches a recent packet.  Returns 0 if the packet is
	// not in cache, and, in that case, optionally schedules a NACK.
	GetPacket(seqno uint16, result []byte, nack bool) uint16
	RequestKeyframe() error
}

Type UpTrack represents a track in the client to server direction.

Jump to

Keyboard shortcuts

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