Documentation
¶
Index ¶
- func NewDialer() network.Dialer
- func NewTransporter(options *config.Options) network.Transporter
- type Conn
- func (c *Conn) Close() error
- func (c *Conn) Flush() error
- func (c *Conn) HandleSpecificError(err error, rip string) (needIgnore bool)
- func (c *Conn) Len() int
- func (c *Conn) LocalAddr() net.Addr
- func (c *Conn) Malloc(n int) ([]byte, error)
- func (c *Conn) Peek(n int) ([]byte, error)
- func (c *Conn) Read(b []byte) (int, error)
- func (c *Conn) ReadBinary(n int) ([]byte, error)
- func (c *Conn) ReadByte() (b byte, err error)
- func (c *Conn) ReadFrom(r io.Reader) (n int64, err error)
- func (c *Conn) Release() error
- func (c *Conn) RemoteAddr() net.Addr
- func (c *Conn) SetDeadline(t time.Time) error
- func (c *Conn) SetReadDeadline(t time.Time) error
- func (c *Conn) SetReadTimeout(t time.Duration) error
- func (c *Conn) SetWriteDeadline(t time.Time) error
- func (c *Conn) SetWriteTimeout(t time.Duration) error
- func (c *Conn) Skip(n int) error
- func (c *Conn) ToHertzError(err error) error
- func (c *Conn) Write(b []byte) (n int, err error)
- func (c *Conn) WriteBinary(b []byte) (int, error)
- type TLSConn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTransporter ¶
func NewTransporter(options *config.Options) network.Transporter
For transporter switch
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func (*Conn) HandleSpecificError ¶ added in v0.6.1
func (*Conn) Peek ¶
Peek returns the next n bytes without advancing the reader. If Peek returns fewer than n bytes, it also returns an error explaining why the read is short.
func (*Conn) ReadBinary ¶
ReadBinary is used to read next n byte with copy, and the read pointer will be advanced.
func (*Conn) ReadFrom ¶
ReadFrom implements io.ReaderFrom. If the underlying writer supports the ReadFrom method, this calls the underlying ReadFrom without buffering.
func (*Conn) RemoteAddr ¶
RemoteAddr returns the remote address of the connection.
func (*Conn) SetDeadline ¶
SetDeadline sets the connection deadline.
func (*Conn) SetReadDeadline ¶
SetReadDeadline sets the read deadline of the connection.
func (*Conn) SetWriteDeadline ¶
SetWriteDeadline sets the write deadline of the connection.
func (*Conn) SetWriteTimeout ¶ added in v0.4.1
func (*Conn) ToHertzError ¶ added in v0.5.0
Click to show internal directories.
Click to hide internal directories.