Class: Peer

Peer(configopt)

An in-memory representation of a node in our network.

Constructor

new Peer(configopt)

Create an instance of Peer.
Parameters:
Name Type Attributes Description
config Object <optional>
Initialization Vector for this peer.
Properties
Name Type Attributes Default Description
listen Boolean <optional>
Whether or not to listen for connections.
upnp Boolean <optional>
Whether or not to use UPNP for automatic configuration.
port Number <optional>
7777 Port to use for P2P connections.
peers Array <optional>
[] List of initial peers.
Source:

Members

address

Deprecated:
  • Yes
Source:

Methods

(async) listen() → {Peer}

Start listening for connections.
Source:
Returns:
Chainable method.
Type
Peer

(async) start()

Start the Peer.
Source:

(async) stop()

Stop the peer.
Source: