network

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2024 License: MIT Imports: 11 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL