Documentation
¶
Index ¶
- Variables
- func Build() *error.Error
- func ParsePackage(udpData map[string]interface{}) (interface{}, *error.Error)
- func ReceiveMsg(data interface{}) (interface{}, *error.Error)
- func ReceivePing(data interface{}) *error.Error
- func ReceivePong(data interface{}) *error.Error
- func RunDiscover(chanels map[string]chan map[string]interface{})
- func RunService(chanels map[string]chan map[string]interface{}, signal chan bool) *error.Error
Constants ¶
This section is empty.
Variables ¶
View Source
var MaxPingPong int = 1024
MaxPingPong 缓存最大值
Functions ¶
func ParsePackage ¶
ParsePackage 负责解析接收到的UDP数据包 @param data 从socket缓冲区中读取到的udp数据包 TODO 检查networkid、字段合法性、签名合法性问题
func ReceiveMsg ¶
ReceiveMsg 作为发现服务消息接收的入口
func RunDiscover ¶
RunDiscover 主动寻找种子节点或邻居节点,进行连接
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.