41 data.push_back(value);
55 template <
typename REL_SEND>
56 static size_t ack(REL_SEND &rel_send,
Buffer &buf,
const bool live)
59 for (
size_t i = 0; i < len; ++i)
71 for (
size_t i = 0; i < len; ++i)
80 for (
size_t i = 0; i < len; ++i)
97 size_t acks_added = 0;
99 while (acks_added < max_acks &&
data.size() > 0)
111 while (acks_added <
re_acks.size() && acks_added < max_acks)
121 const id_t net_id = htonl(
id);
122 buf.
prepend((
unsigned char *)&net_id,
sizeof(net_id));
128 buf.
read((
unsigned char *)&net_id,
sizeof(net_id));
129 return ntohl(net_id);
void prepend(const T *data, const size_t size)
Prepend data to the buffer.
T pop_front()
Removes and returns the first element from the buffer.
void push_front(const T &value)
Append a T object to the array, with possible resize.
void read(NCT *data, const size_t size)
Read data from the buffer into the specified memory location.
static void prepend_id(Buffer &buf, const id_t id)
void push_back(id_t value)
void prepend(Buffer &buf, bool ackv1)
static id_t read_id(Buffer &buf)
static constexpr size_t maximum_acks_ack_v1
void add_ack_to_reack(id_t ack)
static constexpr size_t maximum_acks_control_v1
static size_t ack_skip(Buffer &buf)
std::deque< id_t > re_acks
static size_t ack(REL_SEND &rel_send, Buffer &buf, const bool live)
Support deferred server-side state creation when client connects.