Пример #1
0
proxy::proxy(threadpool& pool, socket::ptr socket, uint32_t magic)
  : stopped_(true),
    magic_(magic),
    authority_(socket->get_authority()),
    socket_(socket),
    message_subscriber_(pool),
    ////send_subscriber_(std::make_shared<send_subscriber>(pool, NAME "_send")),
    stop_subscriber_(std::make_shared<stop_subscriber>(pool, NAME "_stop"))
{
}
Пример #2
0
// payload_buffer_ sizing assumes monotonically increasing size by version.
proxy::proxy(threadpool& pool, socket::ptr socket, uint32_t protocol_magic,
    uint32_t protocol_maximum)
  : protocol_magic_(protocol_magic),
    authority_(socket->get_authority()),
    heading_buffer_(heading::maximum_size()),
    payload_buffer_(heading::maximum_payload_size(protocol_maximum)),
    socket_(socket),
    stopped_(true),
    version_(protocol_maximum),
    message_subscriber_(pool),
    stop_subscriber_(std::make_shared<stop_subscriber>(pool, NAME))
{
}