Documentation ¶
Overview ¶
Package network 网络代理
Package network 网络代理器 ¶
Package network tcp网络控制器 ¶
Package network tcp服务器 ¶
Package network websocket连接器 ¶
Package network websocket服务器
Index ¶
- type Agent
- type Conn
- type ConnSet
- type TCPConn
- func (tcpConn *TCPConn) Close() error
- func (tcpConn *TCPConn) Destroy()
- func (tcpConn *TCPConn) LocalAddr() net.Addr
- func (tcpConn *TCPConn) Read(b []byte) (int, error)
- func (tcpConn *TCPConn) RemoteAddr() net.Addr
- func (tcpConn *TCPConn) SetDeadline(t time.Time) error
- func (tcpConn *TCPConn) SetReadDeadline(t time.Time) error
- func (tcpConn *TCPConn) SetWriteDeadline(t time.Time) error
- func (tcpConn *TCPConn) Write(b []byte) (n int, err error)
- type TCPServer
- type WSConn
- func (wsConn *WSConn) Close() error
- func (wsConn *WSConn) Destroy()
- func (wsConn *WSConn) LocalAddr() net.Addr
- func (wsConn *WSConn) Read(p []byte) (n int, err error)
- func (wsConn *WSConn) RemoteAddr() net.Addr
- func (wsConn *WSConn) SetDeadline(t time.Time) error
- func (wsConn *WSConn) SetReadDeadline(t time.Time) error
- func (wsConn *WSConn) SetWriteDeadline(t time.Time) error
- func (wsConn *WSConn) Write(p []byte) (int, error)
- type WSHandler
- type WSServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TCPConn ¶
type TCPConn struct { io.Reader //Read(p []byte) (n int, err error) io.Writer //Write(p []byte) (n int, err error) sync.Mutex // contains filtered or unexported fields }
TCPConn tcp连接
func (*TCPConn) SetDeadline ¶
SetDeadline A zero value for t means I/O operations will not time out.
func (*TCPConn) SetReadDeadline ¶
SetReadDeadline sets the deadline for future Read calls. A zero value for t means Read will not time out.
func (*TCPConn) SetWriteDeadline ¶
SetWriteDeadline sets the deadline for future Write calls. Even if write times out, it may return n > 0, indicating that some of the data was successfully written. A zero value for t means Write will not time out.
type TCPServer ¶
type TCPServer struct { Addr string TLS bool //是否支持tls CertFile string KeyFile string MaxConnNum int NewAgent func(*TCPConn) Agent // contains filtered or unexported fields }
TCPServer tcp服务器
type WSConn ¶
type WSConn struct { io.Reader //Read(p []byte) (n int, err error) io.Writer //Write(p []byte) (n int, err error) sync.Mutex // contains filtered or unexported fields }
WSConn websocket连接
func (*WSConn) SetDeadline ¶
SetDeadline A zero value for t means I/O operations will not time out.
func (*WSConn) SetReadDeadline ¶
SetReadDeadline sets the deadline for future Read calls. A zero value for t means Read will not time out.
func (*WSConn) SetWriteDeadline ¶
SetWriteDeadline sets the deadline for future Write calls. Even if write times out, it may return n > 0, indicating that some of the data was successfully written. A zero value for t means Write will not time out.
type WSHandler ¶
type WSHandler struct {
// contains filtered or unexported fields
}
WSHandler websocket 处理器