package
0.0.0-20191028102014-6e78f20d1e6c
Repository: https://github.com/chenwbyx/leafserver.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
* ///////////////////////////////////////////////////////////////////////
* Auther: chenWB
* Date: 2019-10-28
* ///////////////////////////////////////////////////////////////////////
* 在 Leaf 中,默认的 Protobuf Processor 将一个完整的 Protobuf 消息定义为如下格式:
* -------------------------
* | id | protobuf message |
* -------------------------
* 其中 id 为 2 个字节。如果你选择使用 TCP 协议时,在网络中传输的消息格式如下:
* -------------------------------
* | len | id | protobuf message |
* -------------------------------
* 如果你选择使用 WebSocket 协议时,发送的消息格式如下:
* -------------------------
* | id | protobuf message |
* -------------------------
* 其中 len 默认为两个字节,len 和 id 默认使用网络字节序。
* //TODO:本测试使用TCP测试
* 最终生成的字节流为:
* -------------------------------------------------------
* | len(2字节) | id(2字节) | protobuf message(len(data)) |
* -------------------------------------------------------
* 其中len = len(id) + len(data)
*/.