udptransport2

package
v0.0.0-...-b09c24f Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

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

func NewFactory

func NewFactory(params FactoryParams) (*Factory, error)

func (*Factory) Close

func (f *Factory) Close()

func (*Factory) CloseTransport

func (f *Factory) CloseTransport(streamID identifiers.RoomID) error

func (*Factory) CreateTransport

func (f *Factory) CreateTransport(streamID identifiers.RoomID) error

func (*Factory) Done

func (f *Factory) Done() <-chan struct{}

func (*Factory) TransportsChannel

func (f *Factory) TransportsChannel() <-chan *Transport

type FactoryParams

type FactoryParams struct {
	Log logger.Logger
	// Conn is the net.Conn to use for creating transports.
	Conn net.Conn
	// Clock is used for creating a ticker. A Clock interface is used to allow
	// easier mocking.
	Clock clock.Clock
	// PingTimeout is the timeout after which a Ping event will be sent.
	PingTimeout time.Duration

	InterceptorRegistry *interceptor.Registry
}

type Manager

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

func NewManager

func NewManager(params ManagerParams) *Manager

func (*Manager) Close

func (m *Manager) Close()

func (*Manager) Factories

func (m *Manager) Factories() []*Factory

func (*Manager) FactoriesChannel

func (m *Manager) FactoriesChannel() <-chan *Factory

FactoriesChannel contains factories created from incoming connections. Users must read from this channel to prevent deadlocks.

func (*Manager) GetFactory

func (m *Manager) GetFactory(raddr net.Addr) <-chan NewFactoryResponse

type ManagerParams

type ManagerParams struct {
	Conn                net.PacketConn
	Log                 logger.Logger
	Clock               clock.Clock
	PingTimeout         time.Duration
	DestroyTimeout      time.Duration
	InterceptorRegistry *interceptor.Registry
}

type NewFactoryResponse

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

func (NewFactoryResponse) Result

func (r NewFactoryResponse) Result() (*Factory, error)

type Transport

type Transport struct {
	*servertransport.Transport
	// contains filtered or unexported fields
}

func NewTransport

func NewTransport(
	log logger.Logger,
	streamID identifiers.RoomID,
	mediaConn stringmux.Conn,
	dataConn stringmux.Conn,
	metadataConn stringmux.Conn,
	interceptorRegistry *interceptor.Registry,
) *Transport

func (*Transport) CloseWrite

func (t *Transport) CloseWrite()

func (*Transport) StreamID

func (t *Transport) StreamID() identifiers.RoomID

TODO rename to RoomID.

Jump to

Keyboard shortcuts

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