socket

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 12 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnAlreadyOpen

func ConnAlreadyOpen(conns []packets.UDPConn, id string) bool

func RandStringBytes

func RandStringBytes(length int) string

Types

type ConnectOptions

type ConnectOptions struct {
	SendAddrPacket          bool
	DontWaitForIncoming     bool
	NoPeriodicPathSelection bool
	NoMetricsCollection     bool
}

type DialOptions

type DialOptions struct {
	SendAddrPacket bool
	NumPaths       int
}

type DialPacket

type DialPacket struct {
	Addr snet.UDPAddr
}

type DialPacketQuic

type DialPacketQuic struct {
	Addr     snet.UDPAddr
	NumPaths int
}

type QUICSocket

type QUICSocket struct {
	NoReturnPathConn bool
	// contains filtered or unexported fields
}

func NewQUICSocket

func NewQUICSocket(local string, opts *SockOptions) *QUICSocket

func (*QUICSocket) CloseAll

func (s *QUICSocket) CloseAll() []error

func (*QUICSocket) Dial

func (s *QUICSocket) Dial(remote snet.UDPAddr, path snet.Path, options DialOptions, i int) (packets.UDPConn, error)

func (*QUICSocket) DialAll

func (s *QUICSocket) DialAll(remote snet.UDPAddr, path []pathselection.PathQuality, options DialOptions) ([]packets.UDPConn, error)

func (*QUICSocket) GetConnections

func (s *QUICSocket) GetConnections() []packets.UDPConn

func (*QUICSocket) GetDialConnections

func (s *QUICSocket) GetDialConnections() []packets.UDPConn

func (*QUICSocket) Listen

func (s *QUICSocket) Listen() error

func (*QUICSocket) WaitForDialIn

func (s *QUICSocket) WaitForDialIn() (*snet.UDPAddr, error)

func (*QUICSocket) WaitForDialInWithContext added in v1.0.2

func (s *QUICSocket) WaitForDialInWithContext(ctx context.Context) (*snet.UDPAddr, error)

func (*QUICSocket) WaitForIncomingConn

func (s *QUICSocket) WaitForIncomingConn() (packets.UDPConn, error)

func (*QUICSocket) WaitForIncomingConnWithContext added in v1.0.3

func (s *QUICSocket) WaitForIncomingConnWithContext(ctx context.Context) (packets.UDPConn, error)

type SCIONSocket

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

func NewSCIONSocket

func NewSCIONSocket(local string) *SCIONSocket

func (*SCIONSocket) CloseAll

func (s *SCIONSocket) CloseAll() []error

func (*SCIONSocket) Dial

func (s *SCIONSocket) Dial(remote snet.UDPAddr, path snet.Path, options DialOptions, i int) (packets.UDPConn, error)

func (*SCIONSocket) DialAll

func (s *SCIONSocket) DialAll(remote snet.UDPAddr, path []pathselection.PathQuality, options DialOptions) ([]packets.UDPConn, error)

func (*SCIONSocket) GetConnections

func (s *SCIONSocket) GetConnections() []packets.UDPConn

func (*SCIONSocket) Listen

func (s *SCIONSocket) Listen() error

func (*SCIONSocket) WaitForDialIn

func (s *SCIONSocket) WaitForDialIn() (*snet.UDPAddr, error)

func (*SCIONSocket) WaitForDialInWithContext added in v1.0.2

func (s *SCIONSocket) WaitForDialInWithContext(ctx context.Context) (*snet.UDPAddr, error)

func (*SCIONSocket) WaitForIncomingConn

func (s *SCIONSocket) WaitForIncomingConn() (packets.UDPConn, error)

func (*SCIONSocket) WaitForIncomingConnWithContext added in v1.0.3

func (s *SCIONSocket) WaitForIncomingConnWithContext(ctx context.Context) (packets.UDPConn, error)

type SockOptions

type SockOptions struct {
	PathSelectionResponsibility string
	MultiportMode               bool
}

type UnderlaySocket

type UnderlaySocket interface {
	Listen() error
	WaitForDialIn() (*snet.UDPAddr, error)
	WaitForDialInWithContext(ctx context.Context) (*snet.UDPAddr, error)
	WaitForIncomingConn() (packets.UDPConn, error)
	WaitForIncomingConnWithContext(ctx context.Context) (packets.UDPConn, error)
	Dial(remote snet.UDPAddr, path snet.Path, options DialOptions, i int) (packets.UDPConn, error)
	DialAll(remote snet.UDPAddr, path []pathselection.PathQuality, options DialOptions) ([]packets.UDPConn, error)
	CloseAll() []error
	GetConnections() []packets.UDPConn
}

Jump to

Keyboard shortcuts

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