Documentation ¶
Index ¶
- func ConnStateListener(c net.Conn, cs http.ConnState)
- type HttpListener
- type MultiProtoHttpCodec
- type MultiProtoInsance
- type MultiProtoProxy
- type MultiProtoProxyCodec
- type MultiProtoServer
- type TcpConnWrapper
- func (c *TcpConnWrapper) Close() error
- func (c *TcpConnWrapper) LocalAddr() net.Addr
- func (c *TcpConnWrapper) Peek(n int) ([]byte, error)
- func (c *TcpConnWrapper) Read(b []byte) (n int, err error)
- func (c *TcpConnWrapper) RemoteAddr() net.Addr
- func (c *TcpConnWrapper) SetDeadline(t time.Time) error
- func (c *TcpConnWrapper) SetReadDeadline(t time.Time) error
- func (c *TcpConnWrapper) SetWriteDeadline(t time.Time) error
- func (c *TcpConnWrapper) WrapBaseForTest(wrap func(net.Conn) net.Conn)
- func (c *TcpConnWrapper) Write(b []byte) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HttpListener ¶
type HttpListener struct {
// contains filtered or unexported fields
}
func (*HttpListener) Addr ¶
func (l *HttpListener) Addr() net.Addr
func (*HttpListener) Close ¶
func (l *HttpListener) Close() error
type MultiProtoHttpCodec ¶
type MultiProtoHttpCodec struct {
// contains filtered or unexported fields
}
func NewMultiProtoHttpCodec ¶
func NewMultiProtoHttpCodec(conn *TcpConnWrapper) *MultiProtoHttpCodec
func (*MultiProtoHttpCodec) Close ¶
func (m *MultiProtoHttpCodec) Close() error
func (*MultiProtoHttpCodec) Context ¶
func (c *MultiProtoHttpCodec) Context() interface{}
func (*MultiProtoHttpCodec) Receive ¶
func (m *MultiProtoHttpCodec) Receive() (interface{}, error)
func (*MultiProtoHttpCodec) Send ¶
func (m *MultiProtoHttpCodec) Send(msg interface{}) error
type MultiProtoInsance ¶
type MultiProtoInsance struct {
// contains filtered or unexported fields
}
func (*MultiProtoInsance) Destroy ¶
func (s *MultiProtoInsance) Destroy()
func (*MultiProtoInsance) Initialize ¶
func (s *MultiProtoInsance) Initialize() error
func (*MultiProtoInsance) RunLoop ¶
func (s *MultiProtoInsance) RunLoop()
type MultiProtoProxy ¶
type MultiProtoProxy struct {
// contains filtered or unexported fields
}
func NewMultiProtoProxy ¶
func NewMultiProtoProxy() *MultiProtoProxy
func (*MultiProtoProxy) NewCodec ¶
func (m *MultiProtoProxy) NewCodec(rw io.ReadWriter) (net2.Codec, error)
type MultiProtoProxyCodec ¶
type MultiProtoProxyCodec struct { State int // contains filtered or unexported fields }
func (*MultiProtoProxyCodec) Close ¶
func (c *MultiProtoProxyCodec) Close() error
func (*MultiProtoProxyCodec) Context ¶
func (c *MultiProtoProxyCodec) Context() interface{}
func (*MultiProtoProxyCodec) Receive ¶
func (c *MultiProtoProxyCodec) Receive() (interface{}, error)
func (*MultiProtoProxyCodec) Send ¶
func (c *MultiProtoProxyCodec) Send(msg interface{}) error
type MultiProtoServer ¶
type MultiProtoServer struct {
// contains filtered or unexported fields
}
func NewMultiProtoServer ¶
func NewMultiProtoServer(listener net.Listener, protoName string) *MultiProtoServer
func (*MultiProtoServer) OnConnectionClosed ¶
func (s *MultiProtoServer) OnConnectionClosed(conn *net2.TcpConnection)
func (*MultiProtoServer) OnConnectionDataArrived ¶
func (s *MultiProtoServer) OnConnectionDataArrived(conn *net2.TcpConnection, msg interface{}) error
func (*MultiProtoServer) OnNewConnection ¶
func (s *MultiProtoServer) OnNewConnection(conn *net2.TcpConnection)
func (*MultiProtoServer) Serve ¶
func (s *MultiProtoServer) Serve()
type TcpConnWrapper ¶
type TcpConnWrapper struct { RecvChan chan interface{} SendChan chan interface{} // contains filtered or unexported fields }
func NewTcpConnWrapper ¶
func NewTcpConnWrapper(base net.Conn) (conn *TcpConnWrapper)
func (*TcpConnWrapper) Close ¶
func (c *TcpConnWrapper) Close() error
func (*TcpConnWrapper) LocalAddr ¶
func (c *TcpConnWrapper) LocalAddr() net.Addr
func (*TcpConnWrapper) RemoteAddr ¶
func (c *TcpConnWrapper) RemoteAddr() net.Addr
func (*TcpConnWrapper) SetDeadline ¶
func (c *TcpConnWrapper) SetDeadline(t time.Time) error
func (*TcpConnWrapper) SetReadDeadline ¶
func (c *TcpConnWrapper) SetReadDeadline(t time.Time) error
func (*TcpConnWrapper) SetWriteDeadline ¶
func (c *TcpConnWrapper) SetWriteDeadline(t time.Time) error
func (*TcpConnWrapper) WrapBaseForTest ¶
func (c *TcpConnWrapper) WrapBaseForTest(wrap func(net.Conn) net.Conn)
Click to show internal directories.
Click to hide internal directories.