adding SSL support and Ruby1.9 support
fixed 1.8 compatibility bug for OpenSSL::SSL::SSLSocket#read_nonblock vs #readpartial
tested in 1.8 and 2.0
websocket: support SIGTERM as exit signal

Similar to SIGINT that is already supported, support SIGTERM in daemon
and non daemon modes.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
websocket: restore signals after processing

WebSocketServer is a library module, as such it should try to restore state
after processing, to allow caller to resume normal operation.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
websocket: do not exit at the middle of process

WebSocketServer is a library module, as such it should not exit process
but return from a method, allowing the caller to execute process show
down.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Merge pull request #98 from alonbl/apicleanup

Minor API cleanups
websocket: fix exception statement introduced by comment 903e3f06ee557

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
websocket: use python logging module

WebSocketServer is a library module, as such, it cannot assume it can
write output to process stdout.

Python logging module is designed in order to allow subscribers to
handle the output out of modules. It is simple and generic mechanism to
separate between data producer and data handling.

Python logging API also has the nature of log level, so the verbose
parameter can probably be obsoleted in favor of logging level. And of
course the logging API has built in support for exception tracebacks, no
need for manual format.

Per upstream request a wrapper is created around python logging to
enable shorter statements and optional replacement.

Add --traffic parameter for traffic specific debug, this is required as
it uses direct unformatted stdout output.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Merge pull request #100 from alonbl/log

websocket: use python logging module
Merge pull request #86 from chrislee35/master

OpenSSL Support for Ruby Module of Websockify