conn

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 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, *overlay.OverlayAddr) (int, error)
	WriteBatch([]ipv4.Message) (int, error)
	LocalAddr() *overlay.OverlayAddr
	RemoteAddr() *overlay.OverlayAddr
	Close() error
}

func New

func New(listen, remote *overlay.OverlayAddr, labels prometheus.Labels) (Conn, error)

type ReadMeta

type ReadMeta struct {
	Src     *overlay.OverlayAddr
	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(a *overlay.OverlayAddr, 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