Documentation ¶
Overview ¶
Package testutil contains operations useful for testing. In particular, it provides fake connections useful for testing client/server interactions.
Index ¶
- Variables
- func NewFakeConn(c *C) (client *FakeConn, server *FakeConn)
- type FakeAddr
- type FakeConn
- func (fc *FakeConn) Close() error
- func (fc *FakeConn) LocalAddr() net.Addr
- func (fc *FakeConn) Read(p []byte) (n int, err error)
- func (fc *FakeConn) RemoteAddr() net.Addr
- func (fc *FakeConn) SetDeadline(t time.Time) error
- func (fc *FakeConn) SetLocalAddr(addr net.Addr)
- func (fc *FakeConn) SetReadDeadline(t time.Time) error
- func (fc *FakeConn) SetRemoteAddr(addr net.Addr)
- func (fc *FakeConn) SetWriteDeadline(t time.Time) error
- func (fc *FakeConn) Write(p []byte) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrClosing = errors.New("use of closed network connection")
)
Functions ¶
func NewFakeConn ¶
NewFakeConn returns a pair of fake connections suitable for testing.
Types ¶
type FakeConn ¶
type FakeConn struct { C *C // contains filtered or unexported fields }
FakeConn is a fake connection used for testing. It implements the net.Conn interface and is useful for simulating I/O between STOMP clients and a STOMP server.
func (*FakeConn) RemoteAddr ¶
func (*FakeConn) SetLocalAddr ¶
func (*FakeConn) SetRemoteAddr ¶
Click to show internal directories.
Click to hide internal directories.