Documentation ¶
Index ¶
- func ManagedConnectionCaller(handler interface{}, params ...interface{})
- type ManagedConnection
- func (mc *ManagedConnection) BytesRead() uint64
- func (mc *ManagedConnection) BytesWritten() uint64
- func (mc *ManagedConnection) Close() (err error)
- func (mc *ManagedConnection) Read(p []byte) (int, error)
- func (mc *ManagedConnection) SetReadTimeout(d time.Duration) error
- func (mc *ManagedConnection) SetTimeout(d time.Duration) error
- func (mc *ManagedConnection) SetWriteTimeout(d time.Duration) error
- func (mc *ManagedConnection) Write(p []byte) (int, error)
- type ManagedConnectionEvents
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ManagedConnectionCaller ¶
func ManagedConnectionCaller(handler interface{}, params ...interface{})
Types ¶
type ManagedConnection ¶
type ManagedConnection struct { net.Conn Events ManagedConnectionEvents // contains filtered or unexported fields }
ManagedConnection provides a wrapper for a net.Conn to be used together with events.
func NewManagedConnection ¶
func NewManagedConnection(conn net.Conn) *ManagedConnection
func (*ManagedConnection) BytesRead ¶
func (mc *ManagedConnection) BytesRead() uint64
BytesRead returns the total number of bytes read.
func (*ManagedConnection) BytesWritten ¶
func (mc *ManagedConnection) BytesWritten() uint64
BytesWritten returns the total number of bytes written.
func (*ManagedConnection) Close ¶
func (mc *ManagedConnection) Close() (err error)
Close closes the connection. Any blocked Read or Write operations will be unblocked and return errors.
func (*ManagedConnection) SetReadTimeout ¶
func (mc *ManagedConnection) SetReadTimeout(d time.Duration) error
func (*ManagedConnection) SetTimeout ¶
func (mc *ManagedConnection) SetTimeout(d time.Duration) error
func (*ManagedConnection) SetWriteTimeout ¶
func (mc *ManagedConnection) SetWriteTimeout(d time.Duration) error
Click to show internal directories.
Click to hide internal directories.