Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConnDebugger ¶
type ConnDebugger struct { net.Conn Writer io.Writer RecvPrefix string RecvSuffix string SendPrefix string SendSuffix string Timestamp bool // contains filtered or unexported fields }
ConnDebugger a connection debug utility
func (*ConnDebugger) Close ¶
func (cd *ConnDebugger) Close() error
Close closes the connection. Any blocked Read or Write operations will be unblocked and return errors.
type ConnDumper ¶
ConnDumper a connection dump utility
func (*ConnDumper) Close ¶
func (cd *ConnDumper) Close() (err error)
Close closes the connection. Any blocked Read or Write operations will be unblocked and return errors.
type ListenerDumper ¶
type ListenerDumper struct { net.Listener Path string // dump path RecvPrefix string RecvSuffix string SendPrefix string SendSuffix string Timestamp bool // contains filtered or unexported fields }
ListenerDumper a listener dump utility
func DumpListener ¶
func DumpListener(listener net.Listener, path string) *ListenerDumper
DumpListener wrap a net.conn for dump
func (*ListenerDumper) Accept ¶
func (ld *ListenerDumper) Accept() (conn net.Conn, err error)
Accept waits for and returns the next connection to the listener.
func (*ListenerDumper) Disable ¶
func (ld *ListenerDumper) Disable(disabled bool)
Disable disable the dumper or not
Click to show internal directories.
Click to hide internal directories.