Documentation ¶
Index ¶
Constants ¶
View Source
const Guar_NO = uint8(0x55) //01010101
View Source
const Guar_YES = uint8(0xAA) //10101010
View Source
const MSG_HEADER_LEN = 8 //unsafe.Sizeof(p)
************ 消息头的相关处理 ************
0 1 2 3 4 5 6 7 ----------------------------------------- |Guar|Ver | MsgLen | MsgType | MsgId | ----------------------------------------- | Body... | -----------------------------------------
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Conn ¶
type Conn struct { *sync.Mutex //kcp操作锁,因为有可能并发创建kcp,所以必须在Conn创建之初创建锁 // contains filtered or unexported fields }
Conn 每条连接建立一个Conn
type Header ¶
Click to show internal directories.
Click to hide internal directories.