using namespace std;
Client::Client(int sock)
- : sock(sock),
- state(Client::READING_REQUEST),
- stream(nullptr),
- header_or_short_response_bytes_sent(0),
- stream_pos(0),
- bytes_sent(0),
- bytes_lost(0),
- num_loss_events(0),
- tls_context(nullptr),
- tls_data_to_send(nullptr),
- tls_data_left_to_send(0),
- in_ktls_mode(false)
+ : sock(sock)
{
request.reserve(1024);
header_or_short_response(serialized.header_or_short_response()),
header_or_short_response_bytes_sent(serialized.header_or_short_response_bytes_sent()),
stream_pos(serialized.stream_pos()),
+ stream_pos_end(serialized.stream_pos_end()),
bytes_sent(serialized.bytes_sent()),
bytes_lost(serialized.bytes_lost()),
num_loss_events(serialized.num_loss_events())
serialized.set_header_or_short_response(header_or_short_response);
serialized.set_header_or_short_response_bytes_sent(serialized.header_or_short_response_bytes_sent());
serialized.set_stream_pos(stream_pos);
+ serialized.set_stream_pos_end(stream_pos_end);
serialized.set_bytes_sent(bytes_sent);
serialized.set_bytes_lost(bytes_lost);
serialized.set_num_loss_events(num_loss_events);