Monero
Loading...
Searching...
No Matches
cryptonote::cryptonote_connection_context Struct Reference

#include <connection_context.h>

Inheritance diagram for cryptonote::cryptonote_connection_context:
Collaboration diagram for cryptonote::cryptonote_connection_context:

Classes

class  copyable_atomic

Public Types

enum  state {
  state_before_handshake = 0 , state_synchronizing , state_standby , state_idle ,
  state_normal
}

Public Member Functions

 cryptonote_connection_context ()
bool handshake_complete () const noexcept
void set_state_normal ()
 Use this instead of m_state = state_normal.
boost::optional< crypto::hashget_expected_hash (uint64_t height) const
Public Member Functions inherited from epee::net_utils::connection_context_base
 connection_context_base (boost::uuids::uuid connection_id, const network_address &remote_address, bool is_income, bool ssl, time_t last_recv=0, time_t last_send=0, uint64_t recv_cnt=0, uint64_t send_cnt=0)
 connection_context_base ()
 connection_context_base (const connection_context_base &a)
connection_context_baseoperator= (const connection_context_base &a)

Static Public Member Functions

static constexpr int handshake_command () noexcept
static size_t get_max_bytes (int command) noexcept

Public Attributes

state m_state
std::vector< std::pair< crypto::hash, uint64_t > > m_needed_objects
std::vector< crypto::hashm_expected_heights
std::unordered_set< crypto::hashm_requested_objects
uint64_t m_remote_blockchain_height
uint64_t m_last_response_height
uint64_t m_expected_heights_start
boost::posix_time::ptime m_last_request_time
copyable_atomic m_callback_request_count
crypto::hash m_last_known_hash
uint32_t m_pruning_seed
uint16_t m_rpc_port
uint32_t m_rpc_credits_per_hash
bool m_anchor
int32_t m_score
int m_expect_response
uint64_t m_expect_height
size_t m_num_requested
copyable_atomic m_new_stripe_notification {0}
copyable_atomic m_idle_peer_notification {0}
Public Attributes inherited from epee::net_utils::connection_context_base
const boost::uuids::uuid m_connection_id
const network_address m_remote_address
const bool m_is_income
const time_t m_started
const bool m_ssl
time_t m_last_recv
time_t m_last_send
uint64_t m_recv_cnt
uint64_t m_send_cnt
double m_current_speed_down
double m_current_speed_up
double m_max_speed_down
double m_max_speed_up

Member Enumeration Documentation

◆ state

Enumerator
state_before_handshake 
state_synchronizing 
state_standby 
state_idle 
state_normal 

Constructor & Destructor Documentation

◆ cryptonote_connection_context()

cryptonote::cryptonote_connection_context::cryptonote_connection_context ( )
inline

Member Function Documentation

◆ get_expected_hash()

boost::optional< crypto::hash > cryptonote::cryptonote_connection_context::get_expected_hash ( uint64_t height) const

◆ get_max_bytes()

std::size_t cryptonote::cryptonote_connection_context::get_max_bytes ( int command)
staticnoexcept
Returns
Maximum number of bytes permissible for command.

◆ handshake_command()

constexpr int cryptonote::cryptonote_connection_context::handshake_command ( )
inlinestaticconstexprnoexcept

◆ handshake_complete()

bool cryptonote::cryptonote_connection_context::handshake_complete ( ) const
inlinenoexcept

◆ set_state_normal()

void cryptonote::cryptonote_connection_context::set_state_normal ( )

Use this instead of m_state = state_normal.

Member Data Documentation

◆ m_anchor

bool cryptonote::cryptonote_connection_context::m_anchor

◆ m_callback_request_count

copyable_atomic cryptonote::cryptonote_connection_context::m_callback_request_count

◆ m_expect_height

uint64_t cryptonote::cryptonote_connection_context::m_expect_height

◆ m_expect_response

int cryptonote::cryptonote_connection_context::m_expect_response

◆ m_expected_heights

std::vector<crypto::hash> cryptonote::cryptonote_connection_context::m_expected_heights

◆ m_expected_heights_start

uint64_t cryptonote::cryptonote_connection_context::m_expected_heights_start

◆ m_idle_peer_notification

copyable_atomic cryptonote::cryptonote_connection_context::m_idle_peer_notification {0}

◆ m_last_known_hash

crypto::hash cryptonote::cryptonote_connection_context::m_last_known_hash

◆ m_last_request_time

boost::posix_time::ptime cryptonote::cryptonote_connection_context::m_last_request_time

◆ m_last_response_height

uint64_t cryptonote::cryptonote_connection_context::m_last_response_height

◆ m_needed_objects

std::vector<std::pair<crypto::hash, uint64_t> > cryptonote::cryptonote_connection_context::m_needed_objects

◆ m_new_stripe_notification

copyable_atomic cryptonote::cryptonote_connection_context::m_new_stripe_notification {0}

◆ m_num_requested

size_t cryptonote::cryptonote_connection_context::m_num_requested

◆ m_pruning_seed

uint32_t cryptonote::cryptonote_connection_context::m_pruning_seed

◆ m_remote_blockchain_height

uint64_t cryptonote::cryptonote_connection_context::m_remote_blockchain_height

◆ m_requested_objects

std::unordered_set<crypto::hash> cryptonote::cryptonote_connection_context::m_requested_objects

◆ m_rpc_credits_per_hash

uint32_t cryptonote::cryptonote_connection_context::m_rpc_credits_per_hash

◆ m_rpc_port

uint16_t cryptonote::cryptonote_connection_context::m_rpc_port

◆ m_score

int32_t cryptonote::cryptonote_connection_context::m_score

◆ m_state

state cryptonote::cryptonote_connection_context::m_state

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