41 using p2p::SessionFace;
42 using p2p::HostCapabilityFace;
43 using p2p::HostCapability;
44 using p2p::Capability;
52 WhisperPeer(std::shared_ptr<SessionFace> _s, HostCapabilityFace* _h,
unsigned _i,
CapDesc const& _cap, uint16_t _capID);
55 static std::string
name() {
return "shh"; }
63 virtual bool interpret(
unsigned _id,
RLP const&)
override;
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
WhisperHost * host() const
unsigned ratingForPeer(Envelope const &e) const
std::chrono::system_clock::time_point m_timer
std::pair< std::string, u256 > CapDesc
virtual bool interpret(unsigned _id, RLP const &) override
dev::Mutex x_advertiseTopicsOfInterest
std::multimap< unsigned, h256 > m_unseen
Rated according to what they want.
TopicBloomFilterHash bloom() const
std::lock_guard< std::mutex > Guard
void noteAdvertiseTopicsOfInterest()
void setBloom(TopicBloomFilterHash const &_b)
boost::multiprecision::number< boost::multiprecision::cpp_int_backend< 256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void >> u256
static std::string name()
TopicBloomFilterHash m_bloom
Peer's topics of interest.
clock::time_point time_point
WhisperPeer(std::shared_ptr< SessionFace > _s, HostCapabilityFace *_h, unsigned _i, CapDesc const &_cap, uint16_t _capID)
void noteNewMessage(h256 _h, Envelope const &_m)
void sendTopicsOfInterest(TopicBloomFilterHash const &_bloom)
sends our bloom filter to remote peer
bool m_advertiseTopicsOfInterest
static unsigned messageCount()
Class for interpreting Recursive Linear-Prefix Data.