Documentation ¶
Index ¶
- Variables
- type Addr
- type Conn
- func (c *Conn) Close() error
- func (c *Conn) LocalAddr() net.Addr
- func (c *Conn) Read(b []byte) (int, error)
- func (c *Conn) RemoteAddr() net.Addr
- 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) Write(b []byte) (int, error)
- type Listener
- type Network
Constants ¶
This section is empty.
Variables ¶
var ( ErrListenerClosed = errors.New("listener closed") ErrAddressAlreadyInUse = errors.New("address already in use") )
Errors.
Functions ¶
This section is empty.
Types ¶
type Addr ¶
Addr is a fake network address.
type Conn ¶
type Conn struct { LAddress string RAddress string Reader *io.PipeReader Writer *io.PipeWriter }
Conn is a fake connection.
func (*Conn) RemoteAddr ¶
RemoteAddr returns the local network address.
func (*Conn) SetDeadline ¶
SetDeadline sets the read and write deadlines associated with the connection. Not implemented.
func (*Conn) SetReadDeadline ¶
SetReadDeadline sets the deadline for future Read calls and any currently-blocked Read call. Not implemented.
func (*Conn) SetWriteDeadline ¶
SetWriteDeadline sets the deadline for future Write calls and any currently-blocked Write call. Not implemented.
type Listener ¶
Listener is a fake network listener.
func NewListener ¶
NewListener creates a new fake listener.
type Network ¶
type Network struct {
// contains filtered or unexported fields
}
Network is a fake network.
func NewNetwork ¶
NewNetwork creates a new fake network.
func (*Network) CreateListener ¶
CreateListener returns fake listener for a specific address.
func (*Network) CreateNetConn ¶
CreateNetConn returns a fake connection to a fake node.
func (*Network) RandomAddress ¶
RandomAddress creates random network address in the format address:port.