Versions in this module Expand all Collapse all v0 v0.1.20 Jul 19, 2023 Changes in this version + const LocalhostZeroIPv6TCP + func GetHostFirstMultiaddr(ha host.Host) string + func GetHostMultiaddrs(ha host.Host) (addrs []string) + func GetHostOnlyFirstMultiaddr(ha host.Host) string + func GetHostOnlyMultiaddrs(ha host.Host) (addrs []string) + func Tick(h host.Host, rendezvous []multiaddr.Multiaddr, peers <-chan peer.AddrInfo, ...) (e error) v0.1.19 Jul 6, 2023 Changes in this version + var DefaultUserAgent = "/indra:" + indra.SemVer + "/" + func BadgerStore(dataPath string) (datastore.Batching, func()) type Listener + func (l *Listener) ProtocolsAvailable() (p protocols.NetworkProtocols) v0.1.18 Jul 2, 2023 v0.1.17 Jul 1, 2023 v0.1.16 Jul 1, 2023 Changes in this version + func SetUserAgent(s string) v0.1.15 Jun 17, 2023 v0.1.14 Jun 7, 2023 v0.1.13 Jun 7, 2023 Changes in this version + const ConnBufs + const DefaultMTU + const IndraLibP2PID + const LocalhostZeroIPv4TCP + func Discover(ctx context.Context, h host.Host, dht *dht.IpfsDHT, rendezvous string) + func GetHostAddress(ha host.Host) string + func GetHostOnlyAddress(ha host.Host) string + func NewDHT(ctx context.Context, host host.Host, bootstrapPeers []multiaddr.Multiaddr) (d *dht.IpfsDHT, e error) + type ByteChan chan slice.Bytes + func NewByteChan(bufs int) ByteChan + func (s ByteChan) Receive() <-chan slice.Bytes + func (s ByteChan) Send(b slice.Bytes) error + type Conn struct + Host host.Host + MTU int + MultiAddr multiaddr.Multiaddr + RemoteKey *crypto.Pub + Transport *DuplexByteChan + func (c *Conn) GetMTU() int + func (c *Conn) GetRecv() tpt.Transport + func (c *Conn) GetRemoteKey() (remoteKey *crypto.Pub) + func (c *Conn) GetSend() tpt.Transport + func (c *Conn) SetMTU(mtu int) + func (c *Conn) SetRemoteKey(remoteKey *crypto.Pub) + type DuplexByteChan struct + Receiver tpt.Transport + Sender tpt.Transport + func NewDuplexByteChan(bufs int) *DuplexByteChan + func NewSimDuplex(bufs int, ctx context.Context) (d *DuplexByteChan) + func (d *DuplexByteChan) Receive() (C <-chan slice.Bytes) + func (d *DuplexByteChan) Send(b slice.Bytes) (e error) + type Listener struct + DHT *dht.IpfsDHT + Host host.Host + MTU int + func NewListener(rendezvous, multiAddr, storePath string, keys *crypto.Keys, ...) (c *Listener, e error) + func (l *Listener) Accept() <-chan *Conn + func (l *Listener) AddConn(d *Conn) + func (l *Listener) DelConn(d *Conn) + func (l *Listener) Dial(multiAddr string) (d *Conn) + func (l *Listener) FindConn(multiAddr string) (d *Conn) + func (l *Listener) GetConnRecv(multiAddr string) (recv tpt.Transport) + func (l *Listener) GetConnSend(multiAddr string) (send tpt.Transport) + func (l *Listener) SetMTU(mtu int)