common_functions.hpp File Reference

Go to the source code of this file.

Functions

size_t hashFunction (size_t maxval, const t_uid &uid)
 Main hash function used in double hashing.
size_t hashFunction2 (size_t maxval, const t_uid &uid)
 Second hash function used in double hashing.
void send_data_cb (int fd, short event_type, void *arg)
 Callback run every time there is something to send in output buffer. It attempts to send next buffer from cli->packets_to_send.
void enqueue_packet (client_s *cli, const buf_el &packet)
 Enqueue packet to client output buffer.


Function Documentation

void enqueue_packet ( client_s cli,
const buf_el packet 
)

Enqueue packet to client output buffer.

Parameters:
cli 
packet packet to send
Returns:

size_t hashFunction ( size_t  maxval,
const t_uid uid 
)

Main hash function used in double hashing.

source: http://www.partow.net/programming/hashfunctions/

Parameters:
maxval Maximum value of the hash
uid 
Returns:
Hash

size_t hashFunction2 ( size_t  maxval,
const t_uid uid 
)

Second hash function used in double hashing.

source: http://www.partow.net/programming/hashfunctions/

Parameters:
maxval Maximum value of the hash
uid 
Returns:
Hash

void send_data_cb ( int  fd,
short  event_type,
void *  arg 
)

Callback run every time there is something to send in output buffer. It attempts to send next buffer from cli->packets_to_send.

Parameters:
[in] fd File descriptor on which event occured.
[in] event_type unused
[in] arg Client context used by fd (as void*)


Generated on Thu Oct 22 16:31:08 2009 for Limit server by  doxygen 1.5.6