#include "types.hpp"
#include <stdlib.h>
#include <event.h>
#include <list>
#include "common_functions.hpp"
#include <pthread.h>
#include <unistd.h>
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 | enqueue_packet (client_s *cli, const buf_el &packet) |
Enqueue packet to client output buffer. |
Enqueue packet to client output buffer.
cli | ||
packet | packet to send |
size_t hashFunction | ( | size_t | maxval, | |
const t_uid & | uid | |||
) |
Main hash function used in double hashing.
source: http://www.partow.net/programming/hashfunctions/
maxval | Maximum value of the hash | |
uid |
size_t hashFunction2 | ( | size_t | maxval, | |
const t_uid & | uid | |||
) |
Second hash function used in double hashing.
source: http://www.partow.net/programming/hashfunctions/
maxval | Maximum value of the hash | |
uid |