MCPcopy Create free account
hub / github.com/bcndev/bytecoin / P2PClient

Method P2PClient

src/p2p/P2P.cpp:26–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24void P2PProtocol::update_my_port(uint16_t port) { return m_client->update_my_port(port); }
25
26P2PClient::P2PClient(bool incoming, D_handler &&d_handler)
27 : sock([this](bool canread, bool canwrite) { advance_state(true); },
28 std::bind(&P2PClient::on_socket_disconnect, this))
29 , incoming(incoming)
30 , d_handler(std::move(d_handler))
31 , buffer(RECOMMENDED_BUFFER_SIZE) {}
32
33void P2PClient::set_protocol(std::unique_ptr<P2PProtocol> &&protocol) {
34 bool protocol_switch = protocol && m_protocol;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected