コード例 #1
0
ファイル: protocol.cpp プロジェクト: cissp0/libbitcoin
void protocol::start_accept(const code& ec, acceptor::ptr accept)
{
    BITCOIN_ASSERT(accept);

    if (ec)
    {
        log_error(LOG_PROTOCOL)
            << "Error starting listener: " << ec.message();
        return;
    }

    // ACCEPT INCOMING CONNECTIONS
    accept->accept(
        dispatch_.ordered_delegate(&protocol::handle_accept,
            this, _1, _2, accept));
}
コード例 #2
0
void session_inbound::start_accept(const code& ec, acceptor::ptr accept)
{
    if (stopped())
        return;

    if (ec)
    {
        log::error(LOG_NETWORK)
            << "Error starting listener: " << ec.message();
        return;
    }

    // ACCEPT THE NEXT INCOMING CONNECTION
    accept->accept(
        dispatch_.ordered_delegate(&session_inbound::handle_accept,
            shared_from_base<session_inbound>(), _1, _2, accept));
}
コード例 #3
0
void session_inbound::start_accept(const code& ec, acceptor::ptr accept)
{
    if (stopped())
    {
        log::debug(LOG_NETWORK)
            << "Suspended inbound connection.";
        return;
    }

    if (ec)
    {
        log::error(LOG_NETWORK)
            << "Error starting listener: " << ec.message();
        return;
    }

    // ACCEPT THE NEXT INCOMING CONNECTION
    accept->accept(BIND3(handle_accept, _1, _2, accept));
}
コード例 #4
0
void session::do_stop_acceptor(const code&, acceptor::ptr accept)
{
    accept->stop();
}