0.2.10 |
|
---|---|
0.2.9 |
|
0.2.8 |
|
0.2.6 |
|
0.1.0 |
|
#9 in #received
26 每月下载次数
77KB
2K SLoC
识别
节点自识别协议
识别行为
在Tentacle框架的架构下,如果您决定一次性打开所有协议,打开的顺序是不确定的。Tentacle也支持打开指定的协议,即通过控制执行顺序来控制打开协议的顺序。
在某些场景中,双方在打开应用协议之前需要确认对方的 capability。Identify 协议可以被视为用户协议层的一般握手协议,它支持传递任意数据进行交互,并可以根据接收到的消息自定义后续行为。
同时,它试探性地发送观察地址和监听地址。
消息类型
table IdentifyMessage {
// These are the addresses on which the peer is listening as multi-addresses.
listen_addrs: AddressVec,
// Observed each other's ip
observed_addr: Address,
// Custom message to indicate self ability, such as list protocols supported
identify: Bytes,
}
依赖项
~20MB
~464K SLoC