Documentation ¶
Overview ¶
Package loopback defines a net.PacketConn implementation where sent messages are echoed back on the same connection.
Index ¶
- Constants
- type Addr
- type Conn
- func (c *Conn) Close() error
- func (c *Conn) LocalAddr() net.Addr
- func (c *Conn) ReadFrom(b []byte) (int, net.Addr, error)
- func (c *Conn) SetDeadline(t time.Time) error
- func (c *Conn) SetReadDeadline(t time.Time) error
- func (c *Conn) SetWriteDeadline(t time.Time) error
- func (c *Conn) WriteTo(b []byte, a net.Addr) (int, error)
Constants ¶
View Source
const (
// Number of packets that can fit into Conn buffers until the writer blocks
PktBufferSize = 16
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Addr ¶
type Addr struct{}
Addr implements net.Addr. It always returns the same constant strings.
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Connects a client-server app to itself to simplify testing.
func (*Conn) SetReadDeadline ¶
SetReadDeadline is a NOP.
func (*Conn) SetWriteDeadline ¶
SetWriteDeadline is a NOP.
Click to show internal directories.
Click to hide internal directories.