break client connect into states and apply timeout
authorAndy Green <andy@warmcat.com>
Mon, 14 Feb 2011 20:25:43 +0000 (20:25 +0000)
committerAndy Green <andy@warmcat.com>
Mon, 14 Feb 2011 20:25:43 +0000 (20:25 +0000)
commitbe93fefa7652d917397a651a2c52cca42dbdebca
treecf1005348026b201457c7c4f4cb66861b2b6c245
parenta71eafce5a17e82425787ddb583fc2b9f3916b3d
break client connect into states and apply timeout

Doing a client connect was atomic until now, blocking
all the other service while it waited for proxy and / or
server response.

This patch uses the new timeout system and breaks the
client connect sequence into three states handled by
the normal poll() processing.  It means that there are
now no blocking network delays and it's all handled
by the main state machine.

Signed-off-by: Andy Green <andy@warmcat.com>
lib/client-handshake.c
lib/libwebsockets.c
lib/private-libwebsockets.h
libwebsockets-api-doc.html