net

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2019 License: MIT Imports: 4 Imported by: 369

README

go-libp2p-net

Discourse posts

Network interfaces for go-libp2p

The libp2p Network package handles all of the peer-to-peer networking. It connects to other hosts, it encrypts communications, it muxes messages between the network's client services and target hosts. It has multiple subcomponents:

  • Conn - a connection to a single Peer
    • MultiConn - a set of connections to a single Peer
    • SecureConn - an encrypted (tls-like) connection
  • Swarm - holds connections to Peers, multiplexes from/to each MultiConn
  • Muxer - multiplexes between Services and Swarm. Handles Request/Reply.
    • Service - connects between an outside client service and Network.
    • Handler - the client service part that handles requests

It looks a bit like this:

[]

Install

go get libp2p/go-libp2p-net

Contribute

Feel free to join in. All welcome. Open an issue!

Check out our contributing document for more information on how we work, and about contributing in general. Please be aware that all interactions related to libp2p are subject to the IPFS Code of Conduct.

Small note: If editing the README, please conform to the standard-readme specification.

Want to hack on IPFS?

License

MIT © 2016 Jeromy Johnson


The last gx published version of this module was: 3.0.30: QmY3ArotKMKaL7YGfbQfyDrib6RVraLqZYWXZvVgZktBxp

Documentation

Overview

Deprecated: use github.com/libp2p/go-libp2p-core/network instead.

Index

Constants

View Source
const (
	// Deprecated: use github.com/libp2p/go-libp2p-core/network.DirectionUnknown instead.
	DirUnknown = core.DirUnknown
	// Deprecated: use github.com/libp2p/go-libp2p-core/network.DirInbound instead.
	DirInbound = core.DirInbound
	// Deprecated: use github.com/libp2p/go-libp2p-core/network.DirOutbound instead.
	DirOutbound = core.DirOutbound
)
View Source
const (
	// Deprecated: use github.com/libp2p/go-libp2p-core/network.NotConnected instead.
	NotConnected = core.NotConnected

	// Deprecated: use github.com/libp2p/go-libp2p-core/network.Connected instead.
	Connected = core.Connected

	// Deprecated: use github.com/libp2p/go-libp2p-core/network.CanConnect instead.
	CanConnect = core.CanConnect

	// Deprecated: use github.com/libp2p/go-libp2p-core/network.CannotConnect instead.
	CannotConnect = core.CannotConnect
)
View Source
const MessageSizeMax = core.MessageSizeMax

Deprecated: use github.com/libp2p/go-libp2p-core/network.MessageSizeMax instead.

Variables

View Source
var EOFTimeout = helpers.EOFTimeout

Deprecated: use github.com/libp2p/go-libp2p-core/helpers.EOFTimeout instead.

View Source
var ErrExpectedEOF = helpers.ErrExpectedEOF

Deprecated: use github.com/libp2p/go-libp2p-core/helpers.ErrExpectedEOF instead.

View Source
var ErrNoConn = core.ErrNoConn

Deprecated: use github.com/libp2p/go-libp2p-core/network.ErrNoConn instead.

View Source
var ErrNoRemoteAddrs = core.ErrNoRemoteAddrs

Deprecated: use github.com/libp2p/go-libp2p-core/network.ErrNoRemoteAddrs instead.

Functions

func AwaitEOF deprecated

func AwaitEOF(s core.Stream) error

Deprecated: use github.com/libp2p/go-libp2p-core/helpers.AwaitEOF instead.

func FullClose deprecated

func FullClose(s core.Stream) error

Deprecated: use github.com/libp2p/go-libp2p-core/helpers.FullClose instead.

func GetDialPeerTimeout deprecated

func GetDialPeerTimeout(ctx context.Context) time.Duration

Deprecated: use github.com/libp2p/go-libp2p-core/network.GetDialPeerTimeout instead.

func GetNoDial deprecated added in v0.0.2

func GetNoDial(ctx context.Context) (nodial bool, reason string)

Deprecated: use github.com/libp2p/go-libp2p-core/network.GetNoDial instead.

func WithDialPeerTimeout deprecated

func WithDialPeerTimeout(ctx context.Context, timeout time.Duration) context.Context

Deprecated: use github.com/libp2p/go-libp2p-core/network.WithDialPeerTimeout instead.

func WithNoDial deprecated added in v0.0.2

func WithNoDial(ctx context.Context, reason string) context.Context

Deprecated: use github.com/libp2p/go-libp2p-core/network.WithNoDial instead.

Types

type Conn deprecated

type Conn = core.Conn

Deprecated: use github.com/libp2p/go-libp2p-core/network.Conn instead.

type ConnHandler deprecated

type ConnHandler = core.ConnHandler

Deprecated: use github.com/libp2p/go-libp2p-core/network.ConnHandler instead.

type ConnMultiaddrs deprecated

type ConnMultiaddrs = core.ConnMultiaddrs

Deprecated: use github.com/libp2p/go-libp2p-core/network.ConnMultiaddrs instead.

type ConnSecurity deprecated

type ConnSecurity = core.ConnSecurity

Deprecated: use github.com/libp2p/go-libp2p-core/network.ConnSecurity instead.

type Connectedness deprecated

type Connectedness = core.Connectedness

Deprecated: use github.com/libp2p/go-libp2p-core/network.Connectedness instead.

type Dialer deprecated

type Dialer = core.Dialer

Deprecated: use github.com/libp2p/go-libp2p-core/network.Dialer instead.

type Direction deprecated

type Direction = core.Direction

Deprecated: use github.com/libp2p/go-libp2p-core/network.Direction instead.

type Network deprecated

type Network = core.Network

Deprecated: use github.com/libp2p/go-libp2p-core/network.Network instead.

type Notifiee deprecated

type Notifiee = core.Notifiee

Deprecated: use github.com/libp2p/go-libp2p-core/network.Notifiee instead.

type NotifyBundle deprecated

type NotifyBundle = core.NotifyBundle

Deprecated: use github.com/libp2p/go-libp2p-core/network.NotifyBundle instead.

type Stat deprecated

type Stat = core.Stat

Deprecated: use github.com/libp2p/go-libp2p-core/network.Stat instead.

type Stream deprecated

type Stream = core.Stream

Deprecated: use github.com/libp2p/go-libp2p-core/network.Stream instead.

type StreamHandler deprecated

type StreamHandler = core.StreamHandler

Deprecated: use github.com/libp2p/go-libp2p-core/network.StreamHandler instead.

Jump to

Keyboard shortcuts

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