Documentation ¶
Overview ¶
Package fakeconn provides a "fake" net.Conn implementation.
Index ¶
- type Conn
- func (c Conn) Close() error
- func (c Conn) LocalAddr() net.Addr
- func (c Conn) Read(b []byte) (n int, err 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) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct { Written *bytes.Buffer ReadFrom *bytes.Buffer // contains filtered or unexported fields }
Conn is a fake net.Conn implementations. Everything that is written to it with Write() is available in the Written buffer, and Read() reads from the data in the ReadFrom buffer.
func (Conn) SetReadDeadline ¶
SetReadDeadline does nothing.
func (Conn) SetWriteDeadline ¶
SetWriteDeadline does nothing.
Click to show internal directories.
Click to hide internal directories.