Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buff ¶
Buff implements ListenerDialer localed. It can use to start a mock server, client connect to server with its transport or dial func.
type ListenerDialer ¶
type ListenerDialer interface { net.Listener DialContext(ctx context.Context, _, _ string) (net.Conn, error) }
ListenerDialer embeds net.Listener and DialContext, DialContext create a new connection to the listener
func MustNewTCP ¶
func MustNewTCP(addr string) ListenerDialer
MustNewTCP returns a ListenerDialer or panic on error
func NewBuff ¶
func NewBuff() ListenerDialer
func NewTCP ¶
func NewTCP(addr string) (ListenerDialer, error)
NewTCP returns a ListenerDialer that listens and dial on TCP
Click to show internal directories.
Click to hide internal directories.