Commit Graph

890 Commits

Author SHA1 Message Date
Peter Åstrand (astrand) 7ecfa4f384 Merge commit 'a04edfe80f54b44df5a3579f71710560c6b7b4fc'
* commit 'a04edfe80f54b44df5a3579f71710560c6b7b4fc':
  Added temp dir for unit test data and cleanup
2013-11-28 09:34:33 +01:00
Peter Åstrand (astrand) bc216fb7d1 Merge commit 'a47be21f9fa69ddf8d888ff9e3c75cdfc9e31c00'
* commit 'a47be21f9fa69ddf8d888ff9e3c75cdfc9e31c00':
  Added unit tests for websocket and websocketproxy
2013-11-28 09:32:49 +01:00
Peter Åstrand (astrand) b92528aeba Merge commit 'c3acdc2e38f871e28ffda1847b4338c4b02296b8'
* commit 'c3acdc2e38f871e28ffda1847b4338c4b02296b8':
  Adds optional TCP_KEEPALIVE to WebSocketServer
2013-11-28 09:32:30 +01:00
Peter Åstrand (astrand) 81e2a53692 Merge commit '13c99bcf053f7f3af8ba84c0d963a9591e020f49'
* commit '13c99bcf053f7f3af8ba84c0d963a9591e020f49':
  Fix search path construction in tests.
2013-11-28 09:14:25 +01:00
Peter Åstrand (astrand) 602248425a Merge commit 'b4e0b534d5d04d57265045b4baf49dd81555064b'
* commit 'b4e0b534d5d04d57265045b4baf49dd81555064b':
  Fix crash when an import is missing
2013-11-28 09:09:03 +01:00
Peter Åstrand (astrand) 3b802c08b7 Merge commit '32b0567343aee7753b2b6be1bc1ee9a69657ba26'
* commit '32b0567343aee7753b2b6be1bc1ee9a69657ba26':
  Fix syntax errors in other/websockify.rb
2013-11-28 09:07:52 +01:00
Peter Åstrand (astrand) 972b30ddc2 Merge commit '0e5c3ecfda3b1506b41412052db75d84df2b4ae7'
* commit '0e5c3ecfda3b1506b41412052db75d84df2b4ae7':
  Handle SIGCHLD properly for multiprocessing
2013-11-28 09:07:41 +01:00
Peter Åstrand (astrand) f58b49fa08 Merge commit 'a61ae52610642ae58e914dda705df8bb9c8213ec'
* commit 'a61ae52610642ae58e914dda705df8bb9c8213ec':
  fixed 1.8 compatibility bug for OpenSSL::SSL::SSLSocket#read_nonblock vs #readpartial tested in 1.8 and 2.0
  adding SSL support and Ruby1.9 support
2013-11-28 09:07:30 +01:00
Peter Åstrand (astrand) 131f9ea645 Merge commit '477dce6cf86d61b20a394f3cbf3170e60d199658'
* commit '477dce6cf86d61b20a394f3cbf3170e60d199658':
  websocket: use python logging module
  websocket: fix exception statement introduced by comment 903e3f06ee557

Adapted to new standard SocketServer RequestHandler design. For
example, this means that self.i_am_client is not needed.
2013-11-28 09:05:24 +01:00
Peter Åstrand (astrand) cbf05f84fe Merge commit '4459824cc8196ad78fe9258b6c560ad46fe4cd52'
* commit '4459824cc8196ad78fe9258b6c560ad46fe4cd52':
  websocket: do not exit at the middle of process
  websocket: restore signals after processing
  websocket: support SIGTERM as exit signal
2013-11-27 14:49:54 +01:00
Peter Åstrand (astrand) 611da86353 Merge commit 'a7fa97f0e14926cc4433483fcb7581e0b3782140'
* commit 'a7fa97f0e14926cc4433483fcb7581e0b3782140':
  WebSocketProxy: support non path target_cfg
2013-11-27 13:41:00 +01:00
Peter Åstrand (astrand) fb4ac5ae51 Merge commit 'edde5cd0ff6059bddae10c9b9faf0b3e8f388a9e'
* commit 'edde5cd0ff6059bddae10c9b9faf0b3e8f388a9e':
  Fixed wiki reference
2013-11-27 13:38:03 +01:00
Peter Åstrand (astrand) 063c7de783 Merge commit 'bff3c373b32ebf707085e3c677bfad19b44fa054' 2013-11-27 13:34:17 +01:00
Peter Åstrand (astrand) 08d37e0deb Merge commit 'f30ad05c70ab2a43c9078e2f79da40f1dc0c60ec'
* commit 'f30ad05c70ab2a43c9078e2f79da40f1dc0c60ec':
  Fix #97: rebind.so not found when installed
2013-11-27 13:33:30 +01:00
Peter Åstrand (astrand) ff30e5461f Merge commit 'ab389d4e7114d7ddbfd085591d336ea5cc06c00d'
* commit 'ab389d4e7114d7ddbfd085591d336ea5cc06c00d':
  Collect zombie child processes within server loop
2013-11-27 13:30:30 +01:00
Peter Åstrand (astrand) 4071291fa9 Merge commit '264f8fdd7f12bd5b9f6813fb8de81c55b6328d9b'
* commit '264f8fdd7f12bd5b9f6813fb8de81c55b6328d9b':
  Update to version 0.5.1
2013-11-27 13:30:22 +01:00
Peter Åstrand (astrand) 611effd83b Merge commit '36cb8f4676c7b5ff34bd22ad729e00e77efb6f00'
* commit '36cb8f4676c7b5ff34bd22ad729e00e77efb6f00':
  Move javascript websockify files to other/js
2013-11-27 13:30:13 +01:00
Peter Åstrand (astrand) b63d197292 Merge commit '36fcd5784fa0825eedbf31d91bc42c970605ddb4'
* commit '36fcd5784fa0825eedbf31d91bc42c970605ddb4':
  Add package file for websockify.js
2013-11-27 13:30:05 +01:00
Peter Åstrand (astrand) cf901ddac5 Merge commit '46450577c2fb119fc5bf0ac09664f22651a080d0' 2013-11-27 13:29:54 +01:00
Peter Åstrand (astrand) 122985bd67 Merge commit 'd3ba23fa64d79eeb602ff1015ec31014fd8e9b35'
* commit 'd3ba23fa64d79eeb602ff1015ec31014fd8e9b35':
  Update to c0855c6cae of web-socket-js
2013-11-27 13:29:45 +01:00
Peter Åstrand (astrand) 19c8482236 Merge commit '6d27b5d321978586ea1601f757ead73dfba03da7'
* commit '6d27b5d321978586ea1601f757ead73dfba03da7':
  Add 2 arguments to websockify.WSRequestHandler

As of now, only implemented the first command; see #83 for details.
2013-11-27 13:27:38 +01:00
Peter Åstrand (astrand) 33a1bd2337 Merge commit 'b7f255ce0b21dc42189205b1f0e46b4f1d9854f9'
* commit 'b7f255ce0b21dc42189205b1f0e46b4f1d9854f9':
  Clarify messages when optional modules are not found.
2013-11-27 12:27:43 +01:00
Peter Åstrand (astrand) 5f8cb96bab Merge commit '477947ba96a00032ae35ac55fd02a4a5f485497e'
* commit '477947ba96a00032ae35ac55fd02a4a5f485497e':
  Remove wsproxy references. Sync launch.sh from noVNC.
2013-11-27 12:27:31 +01:00
Peter Åstrand (astrand) 6ddfaa86ae Merge commit '33e9a21ce4e38d52f43fe775fb154fc71c09c827'
* commit '33e9a21ce4e38d52f43fe775fb154fc71c09c827':
  Add gimite/web-socket-js submodule for DFSG compliance.
2013-11-27 12:26:53 +01:00
Peter Åstrand (astrand) 4dc7c0da7a Merge commit '2d078e8cd83735dad7d98fadcece652d93e2a037'
* commit '2d078e8cd83735dad7d98fadcece652d93e2a037':
  correctly include include directory in egg.
2013-11-27 11:36:47 +01:00
Joel Martin 34a1b68d79 Clarify ssl module build for old python versions. 2013-11-20 07:30:23 -06:00
Joel Martin a04edfe80f Merge pull request #105 from dosaboy/topic/unit-test-cleanup
Added temp dir for unit test data and cleanup
2013-11-20 05:21:18 -08:00
Edward Hope-Morley 32c1abd5d9 Added temp dir for unit test data and cleanup
Unit test data will now go to a temporary dir that will be deleted
once the test completes. The unit tests also setup a logger which
will persist so that it can be inspected once tests complete.

Also fixes a bug where instance var is missing from decode_hybi()

Co-authored-by: natsume.takashi@lab.ntt.co.jp
2013-11-14 12:38:03 +00:00
Joel Martin a47be21f9f Merge pull request #94 from dosaboy/topic/add-unit-tests
Added unit tests for websocket and websocketproxy
2013-10-29 09:44:48 -07:00
Edward Hope-Morley 5e0ff7d855 Added unit tests for websocket and websocketproxy
To run the unit tests just run tox from the top
level directory which will try to run unit tests
for most versions of python. Requires tox to be
installed. To run tox for a specifice env, run
tox -e<env> e.g. for python 2.7 run 'tox -epy27'.

Co-authored-by: natsume.takashi@lab.ntt.co.jp
2013-10-29 16:19:39 +00:00
Joel Martin c3acdc2e38 Merge pull request #93 from dosaboy/topic/set-keepalive-options
Adds optional TCP_KEEPALIVE to WebSocketServer
2013-10-29 08:18:53 -07:00
Joel Martin 13c99bcf05 Fix search path construction in tests.
This way the tests can be run directly from within the tests directory
and they might also have a chance of running on Windows (where the
path separator is different).
2013-10-29 09:41:26 -05:00
Samuel b4e0b534d5 Merge pull request #104 from stevschmid/patch-1
Fix crash when module is missing
2013-10-24 04:22:44 -07:00
Steven Schmid be4119f84f Fix crash when an import is missing
self.msg is not available when checking the imports.

I had the problem on a host where numpy is missing (python 2.7.3).
2013-10-24 11:42:49 +02:00
Solly 32b0567343 Merge pull request #103 from dellsystem/master
Fix syntax errors in other/websockify.rb
2013-10-21 18:29:45 -07:00
dellsystem 82fe329129 Fix syntax errors in other/websockify.rb 2013-10-21 20:59:16 -04:00
Solly 0e5c3ecfda Merge pull request #102 from DirectXMan12/master
Handle SIGCHLD properly for multiprocessing (fixes #101)
2013-10-21 17:16:09 -07:00
Solly Ross 53f1f1989e Handle SIGCHLD properly for multiprocessing
This commit should fix #101 by enabling a special SIGCHLD
handler for when multiprocessing is in use.  The handler
simply calls `multiprocessing.active_children()` (which in
turn calls `_cleanup()`) upon receiving a SIGCHLD.  Now,
the `fallback_SIGCHLD` is only called when `multiprocessing`
is not in use.  See also #95.
2013-10-21 16:52:42 -04:00
Edward Hope-Morley 081046b6cd Adds optional TCP_KEEPALIVE to WebSocketServer
TCP_KEEPALIVE is now enabled by default. Settings for
KEEPCNT, KEEPINTVL and KEEPIDLE can be supplied when
creating WebSocketServer and KEEPALIVE can also be
disabled if required.

Also adds new unit test for testing.

Co-authored-by: natsume.takashi@lab.ntt.co.jp
2013-10-16 11:24:21 +01:00
Joel Martin a61ae52610 Merge pull request #86 from chrislee35/master
OpenSSL Support for Ruby Module of Websockify
2013-10-15 10:32:57 -07:00
Joel Martin 477dce6cf8 Merge pull request #100 from alonbl/log
websocket: use python logging module
2013-10-15 09:41:35 -07:00
Alon Bar-Lev 8a0a47223d 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>
2013-10-15 19:18:17 +03:00
Alon Bar-Lev 1f798214de websocket: fix exception statement introduced by comment 903e3f06ee557
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
2013-10-15 19:18:17 +03:00
Joel Martin 4459824cc8 Merge pull request #98 from alonbl/apicleanup
Minor API cleanups
2013-10-14 13:12:40 -07:00
Alon Bar-Lev c2a40d6900 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>
2013-10-14 22:17:19 +03:00
Joel Martin a7fa97f0e1 Merge pull request #99 from alonbl/targetconfig
WebSocketProxy: support non path target_cfg
2013-10-14 11:38:05 -07:00
Alon Bar-Lev 1190fe1204 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>
2013-10-14 21:13:11 +03:00
Alon Bar-Lev 7026e26d68 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>
2013-10-14 21:01:44 +03:00
Alon Bar-Lev 37e40a78f2 WebSocketProxy: support non path target_cfg
The WebSocketProxy class is usable for creating derived applications
with different logic, especially for the target validation.

Current code assumes that target is a path while in other implementation
it can be object that is loaded at initialization.

This change moves the conversion to absolute path into main function, so
that the WebSocketProxy class will not make that assumption.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
2013-10-14 20:31:24 +03:00
Samuel edde5cd0ff Merge pull request #91 from MartinF/master
Fixed wiki reference
2013-10-09 06:50:08 -07:00