replace hashtable polltable management 27/2927/1
authorAndy Green <andy.green@linaro.org>
Thu, 17 Jan 2013 04:26:48 +0000 (12:26 +0800)
committerKevron Rees <kevron_m_rees@linux.intel.com>
Thu, 7 Mar 2013 21:01:26 +0000 (13:01 -0800)
commit4fb4c88bd27edbcc9a8e0da962ed1c04ac4b3db2
tree3fc1ad39348078fb15c54ff8aed9cc35569e4bd2
parent1684b4709e389097c2aee594c44ae663a0a64b2a
replace hashtable polltable management

This rips out the connection hashtable implementation along with
MAX_CLIENTS and replaces it with a dynamically allocated fds array
and lookup table along the same lines as the new extpoll implementation
from Edwin van den Oetelaar.

It detects the max number of file descriptors possible at context init
time and allocates accordingly; this can be externally controlled by
ulimit and the server run as a specific user to facilitate targeting
specific ulimit rules at it.

Many operations that translated between socket descriptors and struct
websocket or pollfd objects have had iteration removed by this patch
and under load will be a lot faster.

Signed-off-by: Andy Green <andy.green@linaro.org>
README-test-server
lib/client-handshake.c
lib/libwebsockets.c
lib/libwebsockets.h
lib/private-libwebsockets.h