hax/src/tcp.c
/**
 * Retrieve the number of available bytes from a client.
 *   @client: The client.
 *   &returns: The number of bytes.
 */
Retrieve the number of available bytes from a client.
@client: The client.
&returns: The number of bytes.
Retrieve the number of available bytes from a client . @client : The client . &returns : The number of bytes .
size_t tcp_client_avail(struct tcp_client_t *client)
{
	struct data_t *data;
	size_t nbytes = 0;
	for(data = client->in; data != NULL; data = data->next)
		nbytes += data->len - data->idx;
	return nbytes;
}
size_t tcp_client_avail ( struct tcp_client_t * client ) { struct data_t * data ; size_t nbytes = 0 ; for ( data = client -> in ; data != NULL ; data = data -> next ) nbytes += data -> len - data -> idx ; return nbytes ; }
Retrieve the number of available bytes from a client.
Retrieve the number of available bytes from a client .