Documentation ¶
Overview ¶
Package fakenet contains fake network abstractions
Index ¶
- type MockPacketConn
- func (m *MockPacketConn) Close() error
- func (m *MockPacketConn) LocalAddr() net.Addr
- func (m *MockPacketConn) ReadFrom([]byte) (n int, addr net.Addr, err error)
- func (m *MockPacketConn) SetDeadline(time.Time) error
- func (m *MockPacketConn) SetReadDeadline(time.Time) error
- func (m *MockPacketConn) SetWriteDeadline(time.Time) error
- func (m *MockPacketConn) WriteTo([]byte, net.Addr) (n int, err error)
- type PacketConn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockPacketConn ¶
type MockPacketConn struct{}
MockPacketConn for tests
func (*MockPacketConn) Close ¶
func (m *MockPacketConn) Close() error
func (*MockPacketConn) LocalAddr ¶
func (m *MockPacketConn) LocalAddr() net.Addr
func (*MockPacketConn) SetDeadline ¶
func (m *MockPacketConn) SetDeadline(time.Time) error
func (*MockPacketConn) SetReadDeadline ¶
func (m *MockPacketConn) SetReadDeadline(time.Time) error
func (*MockPacketConn) SetWriteDeadline ¶
func (m *MockPacketConn) SetWriteDeadline(time.Time) error
type PacketConn ¶
PacketConn wraps a net.Conn and emulates net.PacketConn
Click to show internal directories.
Click to hide internal directories.