Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var StreamMutex sync.Mutex
流互斥锁
Functions ¶
func SendPubSub ¶
func SendPubSub(p2p *dep2p.DeP2P, pubsub *pubsub.DeP2PPubSub, topic, genre string, receiver peer.ID, data interface{}) error
SendPubSub 向指定的节点发送订阅消息 topic 主题 genre 类型 receiver 接收方ID data 内容
func SendStream ¶
func SendStream(p2p *dep2p.DeP2P, protocol, genre string, receiver peer.ID, data interface{}) (*streams.ResponseMessage, error)
SendStream 向指定的节点发流消息 protocol 协议 genre 类型 receiver 接收方ID data 内容
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.