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

#include <WhisperPeer.h>

Inheritance diagram for dev::shh::WhisperPeer:
[legend]
Collaboration diagram for dev::shh::WhisperPeer:
[legend]

Public Member Functions

 WhisperPeer (std::shared_ptr< SessionFace > _s, HostCapabilityFace *_h, unsigned _i, CapDesc const &_cap, uint16_t _capID)
 
virtual ~WhisperPeer ()
 
WhisperHosthost () const
 
TopicBloomFilterHash bloom () const
 
void sendTopicsOfInterest (TopicBloomFilterHash const &_bloom)
 sends our bloom filter to remote peer More...
 
void noteAdvertiseTopicsOfInterest ()
 

Static Public Member Functions

static std::string name ()
 
static u256 version ()
 
static unsigned messageCount ()
 

Private Member Functions

virtual bool interpret (unsigned _id, RLP const &) override
 
void sendMessages ()
 
unsigned ratingForPeer (Envelope const &e) const
 
void noteNewMessage (h256 _h, Envelope const &_m)
 
void setBloom (TopicBloomFilterHash const &_b)
 

Private Attributes

dev::Mutex x_unseen
 
std::multimap< unsigned, h256m_unseen
 Rated according to what they want. More...
 
std::chrono::system_clock::time_point m_timer = std::chrono::system_clock::now()
 
dev::Mutex x_bloom
 
TopicBloomFilterHash m_bloom
 Peer's topics of interest. More...
 
dev::Mutex x_advertiseTopicsOfInterest
 
bool m_advertiseTopicsOfInterest
 

Friends

class WhisperHost
 

Detailed Description

Definition at line 47 of file WhisperPeer.h.

Constructor & Destructor Documentation

WhisperPeer::WhisperPeer ( std::shared_ptr< SessionFace >  _s,
HostCapabilityFace *  _h,
unsigned  _i,
CapDesc const &  _cap,
uint16_t  _capID 
)

Definition at line 31 of file WhisperPeer.cpp.

Here is the call graph for this function:

WhisperPeer::~WhisperPeer ( )
virtual

Definition at line 39 of file WhisperPeer.cpp.

Member Function Documentation

TopicBloomFilterHash dev::shh::WhisperPeer::bloom ( ) const
inline

Definition at line 58 of file WhisperPeer.h.

Here is the call graph for this function:

Here is the caller graph for this function:

WhisperHost * WhisperPeer::host ( ) const

Definition at line 43 of file WhisperPeer.cpp.

Here is the caller graph for this function:

bool WhisperPeer::interpret ( unsigned  _id,
RLP const &  _r 
)
overrideprivatevirtual

Definition at line 48 of file WhisperPeer.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static unsigned dev::shh::WhisperPeer::messageCount ( )
inlinestatic

Definition at line 57 of file WhisperPeer.h.

static std::string dev::shh::WhisperPeer::name ( )
inlinestatic

Definition at line 55 of file WhisperPeer.h.

void dev::shh::WhisperPeer::noteAdvertiseTopicsOfInterest ( )
inline

Definition at line 60 of file WhisperPeer.h.

Here is the call graph for this function:

Here is the caller graph for this function:

void WhisperPeer::noteNewMessage ( h256  _h,
Envelope const &  _m 
)
private

Definition at line 114 of file WhisperPeer.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned WhisperPeer::ratingForPeer ( Envelope const &  e) const
private

Definition at line 121 of file WhisperPeer.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void WhisperPeer::sendMessages ( )
private

Definition at line 90 of file WhisperPeer.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void WhisperPeer::sendTopicsOfInterest ( TopicBloomFilterHash const &  _bloom)

sends our bloom filter to remote peer

Definition at line 143 of file WhisperPeer.cpp.

Here is the caller graph for this function:

void dev::shh::WhisperPeer::setBloom ( TopicBloomFilterHash const &  _b)
inlineprivate

Definition at line 67 of file WhisperPeer.h.

Here is the caller graph for this function:

static u256 dev::shh::WhisperPeer::version ( )
inlinestatic

Definition at line 56 of file WhisperPeer.h.

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class WhisperHost
friend

Definition at line 49 of file WhisperPeer.h.

Member Data Documentation

bool dev::shh::WhisperPeer::m_advertiseTopicsOfInterest
private

Definition at line 77 of file WhisperPeer.h.

TopicBloomFilterHash dev::shh::WhisperPeer::m_bloom
private

Peer's topics of interest.

Definition at line 74 of file WhisperPeer.h.

std::chrono::system_clock::time_point dev::shh::WhisperPeer::m_timer = std::chrono::system_clock::now()
private

Definition at line 71 of file WhisperPeer.h.

std::multimap<unsigned, h256> dev::shh::WhisperPeer::m_unseen
private

Rated according to what they want.

Definition at line 70 of file WhisperPeer.h.

dev::Mutex dev::shh::WhisperPeer::x_advertiseTopicsOfInterest
mutableprivate

Definition at line 76 of file WhisperPeer.h.

dev::Mutex dev::shh::WhisperPeer::x_bloom
mutableprivate

Definition at line 73 of file WhisperPeer.h.

dev::Mutex dev::shh::WhisperPeer::x_unseen
mutableprivate

Definition at line 69 of file WhisperPeer.h.


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