Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EndPoint ¶
type EndPoint interface { Read() Write() }
EndPoint endpoint represents one side of net.conn
Read: read data from net.conn Write: write data to net.conn
type TcpEndPoint ¶
type TcpEndPoint struct {
// contains filtered or unexported fields
}
tcp endpoint struct
func (*TcpEndPoint) Read ¶
func (r *TcpEndPoint) Read()
func (*TcpEndPoint) Write ¶
func (r *TcpEndPoint) Write()
type TcpMessageReader ¶
type TcpMessageReader struct {
// contains filtered or unexported fields
}
TcpMessageReader read req from `net.conn`, if read successfully, return the req'svr session.
if any error occurs, it returns nil session and error, error should be one of the following: - io.Timeout - ...
func NewTcpMessageReader ¶
func NewTcpMessageReader(codec codec.Codec) *TcpMessageReader
func (*TcpMessageReader) Read ¶
func (r *TcpMessageReader) Read(ep *TcpEndPoint) error
type TcpServerTransport ¶
type TcpServerTransport struct {
// contains filtered or unexported fields
}
func (*TcpServerTransport) Address ¶
func (s *TcpServerTransport) Address() string
func (*TcpServerTransport) Closed ¶
func (s *TcpServerTransport) Closed() <-chan struct{}
func (*TcpServerTransport) Codec ¶
func (s *TcpServerTransport) Codec() string
func (*TcpServerTransport) ListenAndServe ¶
func (s *TcpServerTransport) ListenAndServe() error
func (*TcpServerTransport) Network ¶
func (s *TcpServerTransport) Network() string
Click to show internal directories.
Click to hide internal directories.