transport

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: Apache-2.0, MIT, Apache-2.0, + 1 more Imports: 1 Imported by: 59

Documentation

Overview

Deprecated: This package has moved into go-libp2p as a sub-package: github.com/libp2p/go-libp2p/core/transport.

Package transport provides the Transport interface, which represents the devices and network protocols used to send and receive data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CapableConn

type CapableConn = transport.CapableConn

A CapableConn represents a connection that has offers the basic capabilities required by libp2p: stream multiplexing, encryption and peer authentication.

These capabilities may be natively provided by the transport, or they may be shimmed via the "connection upgrade" process, which converts a "raw" network connection into one that supports such capabilities by layering an encryption channel and a stream multiplexer.

CapableConn provides accessors for the local and remote multiaddrs used to establish the connection and an accessor for the underlying Transport. Deprecated: use github.com/libp2p/go-libp2p/core/transport.CapableConn instead

type Listener

type Listener = transport.Listener

Listener is an interface closely resembling the net.Listener interface. The only real difference is that Accept() returns Conn's of the type in this package, and also exposes a Multiaddr method as opposed to a regular Addr method Deprecated: use github.com/libp2p/go-libp2p/core/transport.Listener instead

type Transport

type Transport = transport.Transport

Transport represents any device by which you can connect to and accept connections from other peers.

The Transport interface allows you to open connections to other peers by dialing them, and also lets you listen for incoming connections.

Connections returned by Dial and passed into Listeners are of type CapableConn, which means that they have been upgraded to support stream multiplexing and connection security (encryption and authentication).

If a transport implements `io.Closer` (optional), libp2p will call `Close` on shutdown. NOTE: `Dial` and `Listen` may be called after or concurrently with `Close`.

For a conceptual overview, see https://docs.libp2p.io/concepts/transport/ Deprecated: use github.com/libp2p/go-libp2p/core/transport.Transport instead

type TransportNetwork

type TransportNetwork = transport.TransportNetwork

TransportNetwork is an inet.Network with methods for managing transports. Deprecated: use github.com/libp2p/go-libp2p/core/transport.TransportNetwork instead

type Upgrader added in v0.14.0

type Upgrader = transport.Upgrader

Upgrader is a multistream upgrader that can upgrade an underlying connection to a full transport connection (secure and multiplexed). Deprecated: use github.com/libp2p/go-libp2p/core/transport.Upgrader instead

Jump to

Keyboard shortcuts

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