autop=make_shared<Session>(_h,std::move(*s),_h->node(id),true);// true because we don't care about ids matched for now. Once we have permenant IDs this will matter a lot more and we can institute a safer mechanism.
/// Perform a single round of the write operation. This could end up calling itself asynchronously.
voidwrite();
/// Interpret an incoming message.
boolinterpret(RLPconst&_r);
/// @returns true iff the _msg forms a valid message for sending or receiving on the network.
staticboolcheckPacket(bytesConstRef_msg);
Host*m_server;
Host*m_server;///< The host that owns us. Never null.
std::mutexm_writeLock;
std::deque<bytes>m_writeQueue;
mutablebi::tcp::socketm_socket;///< Socket for the peer's connection. Mutable to ask for native_handle().
Mutexx_writeQueue;///< Mutex for the write queue.
std::deque<bytes>m_writeQueue;///< The write queue.
std::array<byte,65536>m_data;///< Data buffer for the write queue.
bytesm_incoming;///< The incoming read queue of bytes.
mutablebi::tcp::socketm_socket;///< Mutable to ask for native_handle().
std::array<byte,65536>m_data;
PeerInfom_info;
PeerInfom_info;///< Dyanamic information about this peer.
bytesm_incoming;
unsignedm_protocolVersion;
std::shared_ptr<Node>m_node;
bi::tcp::endpointm_manualEndpoint;
boolm_force=false;/// If true, ignore IDs being different. This could open you up to MitM attacks.
unsignedm_protocolVersion=0;///< The protocol version of the peer.
std::shared_ptr<Node>m_node;///< The Node object. Might be null if we constructed using a bare address/port.
bi::tcp::endpointm_manualEndpoint;///< The endpoint as specified by the constructor.
boolm_force=false;///< If true, ignore IDs being different. This could open you up to MitM attacks.
boolm_dropped=false;///< If true, we've already divested ourselves of this peer. We're just waiting for the reads & writes to fail before the shared_ptr goes OOS and the destructor kicks in.
boolm_theyRequestedNodes=false;
boolm_weRequestedNodes=false;
boolm_theyRequestedNodes=false;///< Has the peer requested nodes from us without receiveing an answer from us?
boolm_weRequestedNodes=false;///< Have we requested nodes from the peer and not received an answer yet?