kubo/net
Juan Batiz-Benet 49cb135ca2 ipfsnet -> swarmnet
swarmnet is a better name for the package, because
it's just a Network implemented with a Swarm.
(ipfsnet will be something slightly different).
2015-01-02 08:46:44 -08:00
..
backpressure ipfsnet -> swarmnet 2015-01-02 08:46:44 -08:00
conn refactor: rename testutil func 2014-12-24 09:31:17 -05:00
handshake peer change: peer.Peer -> peer.ID 2014-12-23 08:33:32 -08:00
mock net: move Network implementation to own pkg 2015-01-02 08:46:43 -08:00
services ipfsnet -> swarmnet 2015-01-02 08:46:44 -08:00
swarm use yamux as go-peerstream transport 2015-01-01 23:24:09 -08:00
swarmnet ipfsnet -> swarmnet 2015-01-02 08:46:44 -08:00
interface.go net: move Network implementation to own pkg 2015-01-02 08:46:43 -08:00
README.md net: README. 2014-12-09 02:12:43 -08:00

Network

The IPFS 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 Requet/Reply.
    • Service - connects between an outside client service and Network.
    • Handler - the client service part that handles requests

It looks a bit like this:

![](https://docs.google.com/drawings/d/1FvU7GImRsb9GvAWDDo1le85jIrnFJNVB_OTPXC15WwM/pub?h=480)