add timeout to SocketIOServer
Merge pull request #1 from abourget/master

get changes
Exception if not connected
catch TypeError websocket exception
Added configuration of the "heartbeat interval" and "heartbeat timeout", as
well as the "close timeout", which are now sent to the client, like the
NodeJS version.  That config is handed down to the SocketIOHandler, down
to the Socket, and down to the transport for each component's use.

Added documentation.  Reworked the handle_one_response() a bit to be more
straightforward.

Now halt with a bad error if someone tries to hook a socket that doesn't
exist, instead of blowing up in the face of the user (the user repeatedly
sent hundreds of request to hook back onto the socket that didn't exist
anymore, after a restart or something like that).

Renamed transports::connect to do_exchange, as it is really the function
that pushes and gets data when a long-polling request arrives.  It also
bootstraps the exchange processes for the websocket, so it is a more
correct word.

Connection establishment determination and heartbeat spawning is now taken
care of directly in the handler.py file, instead of disseminated and copied
everything in the transports.py file.

Prevent the heartbeat from killing the all the threads upon connection (that
was my own bug, actually).

The detection for the state of connectedness is now more precise, and happens
just after the first do_exchange() call.. so that communication is set up,
queues are created, handshake was done long before.. and we're ready.  It
is now done in the correct place also, now delegating that state to other
components than the Socket itself.

Renamed _disconnect_timeout to _heartbeat_timeout, as it is really the
check of the heartbeat that determined the disconnection.  The
gevent.sleep(0) call there seems very important, otherwise the call to
.wait() would return False without waiting for the timeout..  I didn't
get that one, but it work this way.  It's probably why the code was kind
of recursive before (spawning another self._disconnect_timeout each time),
but since we keep track of the processes, it's important that we don't
spawn thousands of them without keeping them in socket.jobs, otherwise
the newly spawn'd _disconnect_timeout woudn't be killed upon socket.kill()

Simplified transports.  They don't need to report their [jobs, anymore],
they only need to use socket.spawn() to register the jobs in the socket.jobs
array, and they are going to be checked for by the watchers and such.

All of this was tested with simple_pyramid_chat.. but seems to work with
other stuff.   Please test thoroughly.

TODO: document the new configuration options.
Fixing wrong rst syntax
Merge pull request #104 from pgiraud/patch-1

Fixing wrong rst syntax
Whoops, typo in start_response!
Merge remote-tracking branch 'origin/master'
Fixed the socket being closed twice
support the proper arg signature
Keep the request open for sockets
fixed setup.py up so that it will work
Merge remote-tracking branch 'm0sh8/master'

Conflicts:
	socketio/transports.py
	socketio/virtsocket.py
Merge pull request #54 from dswarbrick/master

Debian packaging scripts
Fix the HTMLFileTransport ctor
Merge remote-tracking branch 'abourget/master'
Don,t reset the heartbeat() when WE send a message over.. The heartbeat
timeout is to be reset when the client sends something... thereby learning
the other end is still up there.

gevent.killall(self.jobs) after detaching, because we could be killing the
thread that tries to detach itself.
send a disconnect when the browser is closed
added disconnect to the simple chat