Documentation ¶
Index ¶
- type BufioConn
- func (c *BufioConn) Bytes() []byte
- func (c *BufioConn) Close() error
- func (c *BufioConn) LocalAddr() net.Addr
- func (c *BufioConn) Read(b []byte) (n int, err error)
- func (c *BufioConn) RemoteAddr() net.Addr
- func (c *BufioConn) Reset()
- func (c *BufioConn) SetDeadline(t time.Time) error
- func (c *BufioConn) SetReadDeadline(t time.Time) error
- func (c *BufioConn) SetWriteDeadline(t time.Time) error
- func (c *BufioConn) Write(b []byte) (int, error)
- type DataConn
- func (c *DataConn) Close() error
- func (c *DataConn) LocalAddr() net.Addr
- func (c *DataConn) Read(b []byte) (int, error)
- func (c *DataConn) RemoteAddr() net.Addr
- func (c *DataConn) SetDeadline(t time.Time) error
- func (c *DataConn) SetReadDeadline(t time.Time) error
- func (c *DataConn) SetWriteDeadline(t time.Time) error
- func (c *DataConn) Write(b []byte) (int, error)
- type DataListener
- type MultiConn
- func (mc *MultiConn) Close() error
- func (mc *MultiConn) LocalAddr() net.Addr
- func (mc *MultiConn) Read(b []byte) (n int, err error)
- func (mc *MultiConn) RemoteAddr() net.Addr
- func (mc *MultiConn) SetDeadline(t time.Time) error
- func (mc *MultiConn) SetReadDeadline(t time.Time) error
- func (mc *MultiConn) SetWriteDeadline(t time.Time) error
- func (mc *MultiConn) Write(b []byte) (n int, err error)
- type NopCloser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BufioConn ¶
BufioConn implements the net.Conn and dicard the read but holds the write data.
func NewBufioConn ¶
NewBufioConn returns a new bufio connection.
func (*BufioConn) RemoteAddr ¶
RemoteAddr returns the remote address.
func (*BufioConn) SetDeadline ¶
SetDeadline sets the deadline.
func (*BufioConn) SetReadDeadline ¶
SetReadDeadline sets the deadline.
func (*BufioConn) SetWriteDeadline ¶
SetWriteDeadline sets the deadline.
type DataConn ¶
type DataConn struct {
// contains filtered or unexported fields
}
DataConn implements the net.Conn interface which writes to nil and reads from data.
func (*DataConn) RemoteAddr ¶
RemoteAddr returns the remote address.
func (*DataConn) SetDeadline ¶
SetDeadline sets the deadline.
func (*DataConn) SetReadDeadline ¶
SetReadDeadline sets the read deadline.
func (*DataConn) SetWriteDeadline ¶
SetWriteDeadline sets the write deadline.
type DataListener ¶
type DataListener struct {
// contains filtered or unexported fields
}
DataListener implements the net.Listener interface and prepares the connections to accept.
func NewDataListener ¶
func NewDataListener() *DataListener
NewDataListener returns a data listener.
func (*DataListener) Accept ¶
func (ml *DataListener) Accept() (net.Conn, error)
Accept accepts a connection from the listener.
func (*DataListener) AddConn ¶
func (ml *DataListener) AddConn(c net.Conn)
AddConn adds a connection to listener.
type MultiConn ¶
type MultiConn struct {
// contains filtered or unexported fields
}
func NewMultiConn ¶
func NewMultiConn(r io.ReadCloser, w io.WriteCloser) *MultiConn