libp2p

package
v0.0.0-...-ef41e9a Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Libp2pConnector

type Libp2pConnector struct {
	Host          host.Host
	ServerAddress *multiaddr.Multiaddr
	Peer          *peer.AddrInfo
}

func NewLibp2pConnector

func NewLibp2pConnector(serverAddress string, opts ...libp2p.Option) (*Libp2pConnector, error)

func (*Libp2pConnector) Connect

func (lc *Libp2pConnector) Connect(ctx context.Context) error

func (*Libp2pConnector) Disconnect

func (lc *Libp2pConnector) Disconnect() error

func (*Libp2pConnector) OpenStream

func (lc *Libp2pConnector) OpenStream(ctx context.Context, protocolID string) (types.Stream, error)

type Libp2pStream

type Libp2pStream struct {
	// contains filtered or unexported fields
}

func (*Libp2pStream) Close

func (ls *Libp2pStream) Close() error

func (*Libp2pStream) Context

func (ls *Libp2pStream) Context() context.Context

func (*Libp2pStream) Read

func (ls *Libp2pStream) Read(msg []byte) (int, error)

func (*Libp2pStream) Write

func (ls *Libp2pStream) Write(msg []byte) (int, error)

Jump to

Keyboard shortcuts

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