Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Hairpin ¶
Hairpin creates a half-duplex, in-memory, synchronous stream connection where data written on the connection is processed by the handler and then read back on the same connection. Reads and Write are serialized, Writes are blocked by Reads. If not handler is specified, data is copied directly from Tx to Rx. The handler should be safe for concurrent use by multiple goroutines
func PacketHairpin ¶
PacketHairpin creates a half-duplex, in-memory, synchronous packet connection where data written on the connection is processed by the handler and then read back on the same connection. Reads and Write are serialized, Writes are blocked by Reads. If not handler is specified, data is copied directly from Tx to Rx. The handler should be safe for concurrent use by multiple goroutines
Types ¶
type HairpinDialer ¶
HairpinDialer contains options to Dial a Hairpin connection
type HairpinListener ¶
type HairpinListener struct { Handler func(b []byte) []byte // contains filtered or unexported fields }
HairpinListener contains options to create a Listener that creates Hairpin connections
func (*HairpinListener) Addr ¶
func (h *HairpinListener) Addr() net.Addr
func (*HairpinListener) Close ¶
func (h *HairpinListener) Close() error
type PacketHairpinDialer ¶
PacketHairpinDialer contains options to Dial a PacketHairpin connection
type PacketHairpinListener ¶
type PacketHairpinListener struct { PacketHandler func(b []byte) []byte // contains filtered or unexported fields }
PacketHairpinListener contains options to create a Listener that creates PacketHairpin connections
func (*PacketHairpinListener) Addr ¶
func (p *PacketHairpinListener) Addr() net.Addr
func (*PacketHairpinListener) Close ¶
func (p *PacketHairpinListener) Close() error