Documentation ¶
Index ¶
- Variables
- func GetMultPartFormData(form *multipart.Form, key string) []byte
- func GetMultPartFormValue(form *multipart.Form, key string) string
- func SendBack(w http.ResponseWriter, content string, code int)
- func WriteHttp(w http.ResponseWriter, data []byte) (int, error)
- type CliI
- type ServerI
- type SessionI
- type TFConnClose
- type TFHandleMsg
- type TFNewConn
- type TYP_NET
- type TcpCli
- type TcpConn
- type TcpServer
- type WsCli
- type WsConn
- type WsServer
Constants ¶
This section is empty.
Variables ¶
View Source
var DefultHandShakeTimeout time.Duration = time.Duration(3000) * time.Millisecond //默认握手超时(3000ms)
View Source
var DefultHeaderBytes int = 1024 //默认协议头大小
View Source
var DefultReadTimeout time.Duration = time.Duration(3000) * time.Millisecond //默认读超时(3000ms)
View Source
var DefultWriteTimeout time.Duration = time.Duration(3000) * time.Millisecond //默认写超时(3000ms)
View Source
var PackSize int = 1400 //数据包大小 默认MTU
Functions ¶
func GetMultPartFormValue ¶
解析表单数值
Types ¶
type TFConnClose ¶
type TFConnClose func(SessionI)
type TFHandleMsg ¶
type TcpCli ¶
type TcpCli struct {
// contains filtered or unexported fields
}
func NewTcpCli ¶
func NewTcpCli(addr string, f1 TFNewConn, f2 TFHandleMsg, f3 TFConnClose) (*TcpCli, error)
type TcpConn ¶
type TcpConn struct {
// contains filtered or unexported fields
}
func NewTcpConn ¶
func NewTcpConn(conn net.Conn, f1 TFConnClose, f2 TFHandleMsg) (*TcpConn, error)
type TcpServer ¶
type TcpServer struct {
// contains filtered or unexported fields
}
func NewTcpServer ¶
func NewTcpServer(addr string, f1 TFNewConn, f2 TFHandleMsg, f3 TFConnClose) (*TcpServer, error)
type WsCli ¶
type WsCli struct {
// contains filtered or unexported fields
}
func NewWsCli ¶
func NewWsCli(addr string, f1 TFNewConn, f2 TFHandleMsg, f3 TFConnClose) (*WsCli, error)
type WsConn ¶
type WsConn struct {
// contains filtered or unexported fields
}
func NewWsConn ¶
func NewWsConn(conn *ws.Conn, f1 TFConnClose, f2 TFHandleMsg) (*WsConn, error)
type WsServer ¶
type WsServer struct {
// contains filtered or unexported fields
}
func NewWsServer ¶
func NewWsServer(addr string, f1 TFNewConn, f2 TFHandleMsg, f3 TFConnClose) (*WsServer, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.