conn

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SizeOfInt      = C.sizeof_int
	SizeOfTimespec = C.sizeof_struct_timespec
)

Variables

This section is empty.

Functions

func NewReadMessages

func NewReadMessages(n int) []ipv4.Message

func NewWriteMessages

func NewWriteMessages(n int) []ipv4.Message

Types

type Conn

type Conn interface {
	Read(common.RawBytes) (int, *ReadMeta, error)
	ReadBatch([]ipv4.Message, []ReadMeta) (int, error)
	Write(common.RawBytes) (int, error)
	WriteTo(common.RawBytes, *topology.AddrInfo) (int, error)
	WriteBatch([]ipv4.Message) (int, error)
	LocalAddr() *topology.AddrInfo
	RemoteAddr() *topology.AddrInfo
	Close() error
}

func New

func New(listen, remote *topology.AddrInfo, labels prometheus.Labels) (Conn, error)

type ReadMeta

type ReadMeta struct {
	Src     topology.AddrInfo
	RcvOvfl int
	Recvd   time.Time

	ReadDelay time.Duration
	// contains filtered or unexported fields
}

func (*ReadMeta) Reset

func (m *ReadMeta) Reset()

func (*ReadMeta) SetSrc

func (m *ReadMeta) SetSrc(rai *topology.AddrInfo, raddr *net.UDPAddr, ot overlay.Type)

type Timespec

type Timespec C.struct_timespec

Jump to

Keyboard shortcuts

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