endpoint

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: GPL-3.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDataChannelClosed = errors.New("DataChannel state is closed")
View Source
var ErrInitiatorRequired = errors.New("first message initiator is required in webrtc sdp SessionInformation")
View Source
var ErrInitiatorResponderRequired = errors.New("first message initiator responder is required in webrtc sdp SessionInformation")

Functions

func WaitDC

func WaitDC(dc *webrtc.DataChannel, timeout time.Duration) (err error)

Types

type Hub

type Hub interface {
	NewPeerConnection() (*webrtc.PeerConnection, error)
	signaler.Channel
}

type Inbound

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

func NewInbound

func NewInbound(sess signaler.Session, pc *webrtc.PeerConnection) *Inbound

func (*Inbound) ClearSrc

func (*Inbound) ClearSrc()

func (*Inbound) DstIP

func (*Inbound) DstIP() netip.Addr

func (*Inbound) DstToBytes

func (ep *Inbound) DstToBytes() []byte

used for mac2 cookie calculations

func (*Inbound) DstToString

func (ep *Inbound) DstToString() string

func (*Inbound) ExtractInitiator

func (ep *Inbound) ExtractInitiator() (initiator []byte, ierr error)

func (*Inbound) HandleConnect

func (ep *Inbound) HandleConnect(buf []byte) (ierr error)

func (*Inbound) Message

func (ep *Inbound) Message() (ch <-chan []byte)

func (*Inbound) Send

func (ep *Inbound) Send(buf []byte) (err error)

func (*Inbound) SrcIP

func (*Inbound) SrcIP() netip.Addr

func (*Inbound) SrcToString

func (*Inbound) SrcToString() string

type Outbound

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

func NewOutbound

func NewOutbound(id string, hub Hub) *Outbound

func (*Outbound) ClearSrc

func (*Outbound) ClearSrc()

func (*Outbound) Close

func (ep *Outbound) Close() (err error)

func (*Outbound) Connect

func (ep *Outbound) Connect(buf []byte) (ierr error)

func (*Outbound) DstIP

func (*Outbound) DstIP() netip.Addr

func (*Outbound) DstToBytes

func (ep *Outbound) DstToBytes() []byte

used for mac2 cookie calculations

func (*Outbound) DstToString

func (ep *Outbound) DstToString() string

func (*Outbound) Message

func (ep *Outbound) Message() (ch <-chan []byte)

func (*Outbound) Send

func (ep *Outbound) Send(buf []byte) (err error)

func (*Outbound) SrcIP

func (*Outbound) SrcIP() netip.Addr

func (*Outbound) SrcToString

func (*Outbound) SrcToString() string

type Sender

type Sender interface {
	Send(buf []byte) error
}

Jump to

Keyboard shortcuts

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