gortcdc

package module
v0.0.0-...-59404e5 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2015 License: BSD-2-Clause Imports: 12 Imported by: 0

README

librtcdc rewritten in Go (work in progress).

Documentation

Index

Constants

View Source
const (
	WebRTCControlPPID       = 50
	WebRTCStringPPID        = 51
	WebRTCBinaryPartialPPID = 52
	WebRTCBinaryPPID        = 53
	WebRTCStringPartialPPID = 54
	WebRTCStringEmptyPPID   = 56
	WebRTCBinaryEmptyPPID   = 57

	DcepRequest = 0x03
	DcepAck     = 0x02

	ChannelReliable        = 0x00
	ChannelUnordered       = 0x80
	ChannelRexmit          = 0x01
	ChannelUnorderedRexmit = 0x81
	ChannelTimed           = 0x02
	ChannelUnorderedTimed  = 0x82

	PriorityBelowNormal = 128
	PriorityNormal      = 256
	PriorityHigh        = 512
	PriorityExtraHigh   = 1024
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DcepAckMessage

type DcepAckMessage struct {
	MessageType uint8
}

func (*DcepAckMessage) Decode

func (d *DcepAckMessage) Decode(data []byte) error

func (*DcepAckMessage) Encode

func (d *DcepAckMessage) Encode() []byte

type DcepRequestMessage

type DcepRequestMessage struct {
	MessageType uint8
	ChannelType uint8
	Priority    uint16
	Reliability uint32
	Label       string
	Protocol    string
}

func (*DcepRequestMessage) Decode

func (d *DcepRequestMessage) Decode(data []byte) error

func (*DcepRequestMessage) Encode

func (d *DcepRequestMessage) Encode() []byte

type Peer

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

func NewPeer

func NewPeer() (*Peer, error)

func (*Peer) Destroy

func (p *Peer) Destroy()

func (*Peer) GenerateOfferSdp

func (p *Peer) GenerateOfferSdp() (string, error)

func (*Peer) ParseCandidateSdp

func (p *Peer) ParseCandidateSdp(cands string) int

func (*Peer) ParseOfferSdp

func (p *Peer) ParseOfferSdp(offer string) (int, error)

func (*Peer) Run

func (p *Peer) Run(s Signaller) error

type Signal

type Signal struct {
	Type  string `json:"type"`
	Value string `json:"value"`
}

type Signaller

type Signaller interface {
	Send(data []byte) error
	ReceiveFrom() <-chan []byte
}

Jump to

Keyboard shortcuts

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