Documentation ¶
Index ¶
Constants ¶
View Source
const ( // 最大傳輸單元(Maximum Transmission Unit): 最大封包大小 MTU int32 = 1500 DATALENGTH int32 = 4 BUFFER_SIZE int32 = 10 )
Variables ¶
View Source
var ConnectStateString = []string{
"Unused",
"Connecting",
"Connected",
"Timeout",
"Disconnect",
"Reconnect",
}
Functions ¶
This section is empty.
Types ¶
type ConnectState ¶
type ConnectState int32
const ( // 未使用 Unused ConnectState = iota // 嘗試連線中(如果 通訊模式 尚未確定,就傳回嘗試連線中) Connecting // 連線中 Connected // 超時斷線 Timeout // 斷線 Disconnect // 重新連線中 Reconnect )
func (ConnectState) String ¶
func (cs ConnectState) String() string
type SocketType ¶
type SocketType byte
const ( // 前 4 碼為數據長度,後面才是實際要傳的數據 Tcp0 SocketType = iota Http )
func (SocketType) String ¶
func (s SocketType) String() string
Click to show internal directories.
Click to hide internal directories.