Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | Private Attributes | List of all members
dev::WebThree Class Reference

Main API hub for interfacing with Web 3 components. More...

#include <WebThree.h>

Collaboration diagram for dev::WebThree:
[legend]

Public Member Functions

 WebThree ()
 Constructor for public instance. This will be shared across the local machine. More...
 
 ~WebThree ()
 Destructor. More...
 
eth::Interfaceethereum () const
 
shh::Interfacewhisper () const
 
bzz::Interface * swarm () const
 
std::vector< p2p::PeerSessionInfopeers ()
 Get information on the current peer set. More...
 
size_t peerCount () const
 Same as peers().size(), but more efficient. More...
 
void connect (std::string const &_seedHost, unsigned short _port=30303)
 Connect to a particular peer. More...
 
bool haveNetwork ()
 Is the network subsystem up? More...
 
dev::bytes savePeers ()
 Save peers. More...
 
void restorePeers (bytesConstRef _saved)
 Restore peers. More...
 

Private Attributes

EthereumSlavem_ethereum = nullptr
 
WhisperSlavem_whisper = nullptr
 
RPCSlave m_rpcSlave
 

Detailed Description

Main API hub for interfacing with Web 3 components.

This does transparent local multiplexing, so you can have as many running on the same machine all working from a single DB path.

Definition at line 268 of file WebThree.h.

Constructor & Destructor Documentation

dev::WebThree::WebThree ( )

Constructor for public instance. This will be shared across the local machine.

dev::WebThree::~WebThree ( )

Destructor.

Member Function Documentation

void dev::WebThree::connect ( std::string const &  _seedHost,
unsigned short  _port = 30303 
)

Connect to a particular peer.

eth::Interface* dev::WebThree::ethereum ( ) const
inline

Definition at line 279 of file WebThree.h.

bool dev::WebThree::haveNetwork ( )

Is the network subsystem up?

size_t dev::WebThree::peerCount ( ) const

Same as peers().size(), but more efficient.

std::vector<p2p::PeerSessionInfo> dev::WebThree::peers ( )

Get information on the current peer set.

void dev::WebThree::restorePeers ( bytesConstRef  _saved)

Restore peers.

dev::bytes dev::WebThree::savePeers ( )

Save peers.

bzz::Interface* dev::WebThree::swarm ( ) const
inline

Definition at line 281 of file WebThree.h.

shh::Interface* dev::WebThree::whisper ( ) const
inline

Definition at line 280 of file WebThree.h.

Member Data Documentation

EthereumSlave* dev::WebThree::m_ethereum = nullptr
private

Definition at line 304 of file WebThree.h.

RPCSlave dev::WebThree::m_rpcSlave
private

Definition at line 308 of file WebThree.h.

WhisperSlave* dev::WebThree::m_whisper = nullptr
private

Definition at line 305 of file WebThree.h.


The documentation for this class was generated from the following file: