net

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IP

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

func (*IP) FromNetAddr

func (i *IP) FromNetAddr(addr net.Addr)

func (*IP) FromNetIP

func (i *IP) FromNetIP(ip net.IP)

func (*IP) Marshal

func (i *IP) Marshal(data []byte)

Marshal converts an IP to 16 byte host byte order

func (*IP) Parse

func (i *IP) Parse(ip string)

func (IP) String

func (i IP) String() string

func (*IP) Unmarshal

func (i *IP) Unmarshal(data []byte) error

Unmarshal converts 16 bytes in host byte order to IP

type SYNCookie

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

SYNCookie implements a syn cookie for the SRT handshake.

func NewSYNCookie

func NewSYNCookie(daddr string, counter func() int64) (*SYNCookie, error)

NewSYNCookie returns a SYNCookie for a destination address.

func (*SYNCookie) Get

func (s *SYNCookie) Get(saddr string) uint32

Get returns the current syn cookie with a sender address.

func (*SYNCookie) Verify

func (s *SYNCookie) Verify(cookie uint32, saddr string) bool

Verify verfies that two syn cookies relate.

Jump to

Keyboard shortcuts

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