Documentation ¶
Index ¶
Constants ¶
View Source
const ( UNKNOWN int32 = 0 INITED int32 = 1 CONNECTED int32 = 2 WRITE_CLOSED int32 = 3 READ_CLOSED int32 = 4 DESTROYED int32 = 5 )
connection int32us
Variables ¶
View Source
var HandShakeTimeout time.Duration = time.Duration(3000) * time.Millisecond
View Source
var HeaderBytes int = 1024
View Source
var PackSize int = 1400 // package size(default:MTU)
View Source
var ReadBufSize int = 64 * PackSize // total read buf size
View Source
var ReadTimeout time.Duration = time.Duration(3000) * time.Millisecond
View Source
var WriteBufSize int = 64 * PackSize // totaol write buf size
View Source
var WriteTimeout time.Duration = time.Duration(3000) * time.Millisecond
Functions ¶
This section is empty.
Types ¶
type ConnCloseCB ¶
type ConnCloseCB func(SessionI)
type TcpClient ¶
type TcpClient struct {
// contains filtered or unexported fields
}
func NewTcpClient ¶
func NewTcpClient() *TcpClient
Click to show internal directories.
Click to hide internal directories.