pktdisp

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DispLogger

func DispLogger(dp *DispPkt)

func PktDispatcher

func PktDispatcher(c snet.Conn, f DispatchFunc, pktDispStop chan struct{})

PktDispatcher listens on c, and calls f for every packet read. N.B. the DispPkt passed to f is reused, so applications should make a copy if this is a problem.

Types

type DispPkt

type DispPkt struct {
	Raw  common.RawBytes
	Addr *snet.Addr
}

type DispatchFunc

type DispatchFunc func(*DispPkt)

Jump to

Keyboard shortcuts

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