-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change dependencies -> master #94
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Use HTTP.jl * Support SSLContext
* Update README * Graceful close from client + run HTTP server HttpServer server simulataneously. * Test ping, pong. Temp tests.
new file: examples/chat_explore.jl
… when merging to master.
* Update README * Graceful close from client + run HTTP server HttpServer server simulataneously. * Test ping, pong. Temp tests. * Add try, catch and close Indent WIP * Fix String mask issue * Minor: Fix an indent * Update WebSockets.jl Add a comment to remove the `copy` for v0.7.
…modifified upgrade function (get errors)
… import functions where necessary.
…Sockets.jl into change_dependencies
modified: examples/chat_explore.jl
mod: examples/chat_explore.html mod: examples/repl-client.html mod: test/browsertest.html mod: test/browsertest2.html - tightened html5 syntax, now enforced by Firefox mod: examples/chat_explore.jl - removed ad-hoc modification of WebSockets.upgrade mod: src/HTTP.jl - slightly quicker is_websocket_handshake, added comment mod: src/HttpServer.jl - slightly quicker is_upgrade, added comment - revised upgrade function, improved feedback on caught errors, otherwise as previously in chat_explore.jl This may be changed back again if we include more fields in the WebSocket type.
Droppped some temporary debug code that remained by accident. Faster checking of Connection => "upgrade" || "keep alive, upgrade" mod: src/HttpServer.jl Faster checking of Connection => "upgrade" || "keep alive, upgrade"
upgrade: dropped calling handler taking the binary argument modified: src/HttpServer.jl regexp matching "Connection => xxUPgradEx"
modified: src/HttpServer.jl modified: src/WebSockets.jl
…warn' lines, removed 'listen', removed 'binary' argument from functions upgrade and open. modified: src/HttpServer.jl # Temporary comment on handshakes, removed double try-catch on close. modified: src/WebSockets.jl # TODO comment on error handling
new file: examples/serve_verbose/svg/ws_neighborhood.svg
mod: examples/serve_verbose/svg/ws_neighborhood.svg Smaller size
…eets mess with inlined svg) modified: src/HttpServer.jl Reinstated try-catch after ci failure (this works locally)
extra requirements for benchmark new file: benchmark/bce.html Browser Client Echo definition new file: benchmark/benchmark.jl Comment lines only, so far new file: benchmark/benchmark_prepare.jl Bandwidth tests, all clients new file: benchmark/favicon.ico Tab icon for bce.html new file: benchmark/functions_benchmark.jl Included in benchmark_prepare.jl new file: benchmark/functions_open_browsers.jl Improved functionality, will replace test/functions_open_browsers.jl new file: benchmark/logs/benchmark_results_readable.log Manual copy-paste from generated benchmark_results.log ...since the utf8-encoding to file is not working well. new file: benchmark/phantom.js Definitions for phantomjs browser new file: benchmark/ws_hts.jl Server for HTTP, websockets, bce.html new file: benchmark/ws_jce.jl Julia Client Echo new file: logutils/log_http.jl Included in logutils_ws, HTTP types new file: logutils/log_httpserver.jl Included in logutils_ws, HttpServer types new file: logutils/log_ws.jl Included in logutils_ws, WebSocket types new file: logutils/logutils_ws.jl Logging utilities, included in benchmark_prepare. modified: src/HTTP.jl Added help text examples. In open(), add own error handling (to be improved). upgrade() error handling is also temporary. modified: src/WebSockets.jl Non-blocking read while closing. Added a reasonable closing handshake timeout Commented out WebSocketClosedError (this must be considered more): Breaks some test code. Rewriting comments (not finished) In read(ws), ignore most easy-to-trigger errors which have to do with opening / closing / scheduling/ browser behaviour. modified: test/runtests.jl Sleep a little longer, CI is slow.
dropped dead code densityplot modified: benchmark/ws_hts.jl Added testing for pre-existing sockets. modified: benchmark/ws_jce.jl Added explanation for currently unused 'delay' code modified: examples/chat_explore.jl Added reference to alternative close-down method
Recurse to the next frame like in master. modified: src/WebSockets.jl Reintroduce recursion on control frames:376. Returning control codes would crash String(msg). Multi-frame messages are also possible. Add WebSocketClosedError messages :47, for underlying exceptions. Propagate unrecognized errors. Remove INFO message when closing. Readguarded() informs better. Added functions: readguarded return tuple: data and success indication incomplete messages are always empty writeguarded return success indication subprotocol(request) common for Httpserver and HTTP target(request) common for Httpserver and HTTP origin(request) common for Httpserver and HTTP modified: src/HTTP.jl make upgrade(ws) call websocket handler with full request. Origin can now be determined, as per recommendations. call showerror with catch_stacktrace(). backtrace was less interesting. add method target(request) add method origin(request) add method subprotocol(request) add ServerWS WebsocketHandler serve(::ServerWS, etc..) The intententions is user code brevity, access to HTTP keyword options, more similar interface with HttpServer, can save the user from distinguishing Stream and Message. modified: src/HttpServer.jl add method target(request) add method origin(request) add method subprotocol(request) improve inline doc for WebSocketHandler modified: examples/chat_explore.jl demonstrate new functions, improve readability modified: benchmark/functions_benchmark.jl capture WebSocketClosedError with readguarded(ws) modified: logutils/log_httpserver.jl explicitly import Request and Response from HttpServer modified: test/functions_server.jl rephrase inline docs, use subprotocol(request) modified: test/runtests.jl not rely on pong returning read(ws) call
modified: benchmark/ws_hts.jl isclosed -> !isopen modified: src/HTTP.jl remove dead code 'browserclient'::bool modified: src/HttpServer.jl reshuffle order of handshake checks, now similar to HTTP.jl modified: src/WebSockets.jl close a socket with handshake and 1002: ProtocolError when incorrect mask received. include status code for sending close include received status codes for receiving close update inline doc introduction remove implemented TODO comments
document an overall reduction in bandwidths, 15% since last benchmark result commit. More than expected. modified: src/HttpServer.jl bugfix remaining since last commit modified: src/WebSockets.jl improve inline doc maskswitch! close: bugfix statuscode 0, use hton instead of reverse modified: test/runtests.jl reintroduce unit tests from master, now including client add close status code test add varying message length
modified: src/HTTP.jl change req.resource -> req.target modified: test/runtests.jl add testset "Test length typemax(UInt16) + 1" include HTTP in handshake testsets
modified: src/HTTP.jl separate _openstream(..) from open for test access modified: src/WebSockets.jl future improvements modified: test/runtests.jl deleted: test/HTTP.jl new file: test/client_server_test.jl new file: test/client_test.jl new file: test/error_test.jl new file: test/frametest.jl new file: test/handshaketest.jl
dead code remove
modified: test/client_test.jl modified: test/error_test.jl
More tests mod: src/WebSockets.jl export WebSocketClosedError close keyword argument 'freereason' received close handshake throws WebSocketClosedError improve criterion for bad mask error include reasons in forced close handshakes mod: src/HTTP.jl use channels for error handling on server side removed invisible exception warnings in 'listen' mod: benchmark/logs/benchmark_results_readable.log add: benchmark/logs/benchmark_results_readable_previous.log 12% slower client side, 10% faster server side mod: benchmark/ws_hts.jl mod: benchmark/ws_jce.jl import clog_notime mod: logutils/log_http.jl mod: logutils/log_httpserver.jl mod: logutils/log_ws.jl mod: test/handler_functions_events.jl remove dead code, tabs mod: test/client_server_test.jl wait for istaskstarted mod: test/client_test.jl less console info, more sleep mod: test/error_test.jl test all exceptions and exception interfaces mod: test/frametest.jl add unknown opcodes, multi-frame message, bad mask errors, peerless close, close frames mod: test/handshaketest.jl reduce console info mod: test/runtests.jl add sleep and total group
mod: test/client_test.jl mod: test/error_test.jl mod: test/runtests.jl
mod: src/WebSockets.jl Add 'end' in example
modified: src/HTTP.jl Improve inline docs modified: src/WebSockets.jl RSV1 compression bit remarks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a long-running development branch. See issue #91 for discussions / tracking of the process. Also #84. The initial pull request introduced a number of rarely occuring exception messages, hence my hesitation to merge. We now have ways of trapping and analyzing all errors that we can from this package, and I believe the readframe_nonblocking prevents a lot of closing handshakes errors.
Merging this branch to master will enable easier checking of consequences to other packages before tagging. There is still a little clean-up work to do. We can delete some redundant code between /benchmark and /test.