summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Remove timeout handling that is incompatible with suspendable ports.HEADmasterDavid Thompson2024-06-052-81/+32
| | | | Timeouts should be handled by a concurrency layer such as fibers.
* Distinguish close frames from timeouts.Matthew Wolff2024-05-093-21/+30
|
* client: Avoid closure allocation for timeouts.Andrew Whatson2023-05-081-30/+31
| | | | | | | | * web/socket/frame.scm (frame-reader): Removed. (make-deadline, deadline-seconds-remaining, read-frame/deadline): New procedures. (read-data-frame, read-close-frame): Call deadline procedures instead of frame-reader.
* client: Support read timeouts on receive & close.Andrew Whatson2023-05-072-22/+82
| | | | | | | | | | | | * web/socket/client.scm (close-websocket): Add timeout parameter. Call read-close-frame with timeout. (websocket-receive): Add timeout parameter. Call read-data-frame with timeout. Don't close the websocket on timeout. * web/socket/frame.scm (port-readable?, port-writable?, frame-reader): New helper procedures. (read-close-frame): New procedure. (read-data-frame): Add timeout parameter. Use frame-reader to support a composed read timeout.
* client: Handle control frames in websocket-receive.Andrew Whatson2023-04-213-42/+64
| | | | | | | | | * web/socket/frame.scm (read-data-frame): New procedure, extracted from serve-client. * web/socket/client.scm (websocket-receive): Call read-data-frame. Clean up the websocket if the connection was closed. * web/socket/server.scm (serve-client): Call read-data-frame. Flush the port after writing the handshake response.
* client: Support secure websockets.Andrew Whatson2023-04-192-21/+27
| | | | | | | | | * web/socket/client.scm (make-client-socket): Add verify-certificate? parameter. Call open-socket-for-uri to create the socket. (handshake): Flush the port after writing the request. (make-websocket): Add #:verify-certificate? parameter. * web/socket/frame.scm (write-frame): Flush the port after writing the frame.
* make: Add some more files to release tarballs.v0.1David Thompson2022-11-121-0/+3
|
* make: Fix distcheck and add publish target.David Thompson2022-11-121-1/+10
|
* Update .gitignore.David Thompson2022-11-121-0/+2
|
* guix: Modernize package definition.David Thompson2022-11-121-21/+15
|
* check: Support guile-3.0.5.Jan (janneke) Nieuwenhuizen2021-03-181-1/+3
| | | | | | | See https://bugs.gnu.org/42713. * tests/frame.scm (test-runner): New define. Use it in exit statement.
* Use inet-pton instead of inet-aton.Jan (janneke) Nieuwenhuizen2021-03-181-1/+3
| | | | | * web/socket/server.scm (make-server-socket): Add #:family parameter and use it for inet-pton.
* mingw: Hack for missing /dev/urandom.Jan (janneke) Nieuwenhuizen2021-03-181-3/+8
| | | | | * web/socket/client.scm (open-entropy-port): Add hack for missing /dev/urandom.
* client: Export websocket-socket.Jan (janneke) Nieuwenhuizen2021-03-181-0/+2
| | | | * web/socket/client.scm (web): Export websocket-socket.
* build: Add web/socket/client.scm.Jan (janneke) Nieuwenhuizen2021-03-181-1/+2
| | | | * Makefile.am (SOURCES): Add web/socket/client.scm.
* build: Support cross building.Jan (janneke) Nieuwenhuizen2021-03-182-1/+2
| | | | | * configure.ac: Add AC_CANONICAL_HOST to get host. * Makefile.am (.scm.go): Set it as target.
* Cater for guile 2.2, 3.0.Jan (janneke) Nieuwenhuizen2021-03-183-4/+11
| | | | * Makefile.am (godir, moddir): Softcode effective version.
* client: Return no values from close-websocket.David Thompson2016-03-251-1/+2
| | | | * web/socket/client.scm (close-websocket): Return an unspecified value.
* client: Validate accept key when handshaking.David Thompson2016-03-251-25/+25
| | | | | | | * web/socket/client.scm (generate-websocket-nonce): Rename to... (generate-client-key): ...this. (make-handshake-request): Change argument list. (handshake): Validate accept key.
* Extract accept key generation to a new module.David Thompson2016-03-253-13/+46
| | | | | | | * web/socket/server.scm (handshake): Moved. (make-handshake-response): Use new make-accept-key procedure. * web/socket/utils.scm: New file. * Makefile.am (SOURCES): Add it.
* client: Mask sent frames.David Thompson2016-03-251-2/+6
| | | | | * web/socket/client.scm (generate-masking-key): New procedure. (websocket-send): Mask the frame to be sent.
* client: Generate random nonce for handshake.David Thompson2016-03-251-5/+11
| | | | | | | * web/socket/client.scm (generate-websocket-nonce): New procedure. (make-handshake-request): Change argument from uri to websocket. Generate a real nonce for Sec-WebSocket-Key header. (handshake): Adjust make-handshake-request call.
* client: Add entropy source.David Thompson2016-03-251-2/+14
| | | | | | | * web/socket/client.scm (<websocket>)[entropy-port]: New field. (open-entropy-port): New procedure. (make-websocket): Open entropy port. (close-websocket): Close entropy port.
* client: Add custom printer for <websocket>.David Thompson2016-03-251-0/+8
| | | | | * web/socket/client.scm (display-websocket): New procedure. (<websocket>): Set custom record type printer.
* client: Keep track of socket state.David Thompson2016-03-251-12/+37
| | | | | | | | | | | * web/socket/client.scm (<websocket>)[state]: New field. (websocket-state, set-websocket-state!): New field accessors. (websocket-connecting?, websocket-open?, websocket-closing?, websocket-closed?): New procedures. (handshake): Set socket to 'open' state after successful handshake. (make-websocket): Set socket to 'connecting' state initially. (close-websocket): Set socket to 'closing' before sending close frame, and then to 'closed' underlying TCP socket is closed.
* frame: Fix typo in error message.David Thompson2016-03-251-1/+1
| | | | * web/socket/frame.scm (read-frame): s/to/too/
* client: Wait for server to close connection.David Thompson2016-03-251-1/+12
| | | | | * web/socket/client.scm (close-websocket): Wait for server to close the connection for a reasonable amount of time.
* server: Handle client disconnects in a more robust manner.David Thompson2016-03-251-3/+14
| | | | | | * web/socket/server.scm (serve-client): Handle EOF object and client sockets that have closed while trying to echo the close frame. (run-server): Ignore SIGPIPE to prevent server crashes.
* Add client module.David Thompson2016-03-241-0/+143
|
* Add guix package.David Thompson2015-12-091-0/+71
|
* Autotoolify.David Thompson2015-12-095-0/+139
|
* Add missing "Lesser" in licensing comments.David Thompson2015-12-092-6/+6
|
* Move base64 and SHA-1 modules to (web socket) namespace.David Thompson2015-12-093-4/+4
|
* tests: Add frame tests.David Thompson2015-12-021-0/+173
|
* frame: Fix masking error in write-frame.David Thompson2015-12-021-2/+1
| | | | | * web/socket/frame.scm (write-frame)[masked-data]: Correctly copy the source bytevector.
* frame: Add make-ping-frame.David Thompson2015-12-021-4/+11
| | | | * web/socket/frame.scm (make-ping-frame): New procedure.
* Add LGPL license information.David Thompson2015-11-083-0/+215
|
* Update test page.David Thompson2015-11-081-2/+2
|
* Use new Expat licensed base64 module.David Thompson2015-11-081-118/+173
|
* Add test HTML page.David Thompson2015-11-082-14/+22
|
* frame: Improve doc strings and comments.David Thompson2015-11-081-3/+14
|
* server: Allow handler to ignore messages.David Thompson2015-11-081-9/+13
|
* Add missing code and a README.David Thompson2015-11-083-0/+337
|
* Fix typo.David Thompson2015-11-071-1/+1
|
* Add (base64) module.David Thompson2015-11-071-0/+230
|
* Add (web socket server) module.David Thompson2015-11-071-0/+116
|
* Improve frame module.David Thompson2015-11-071-17/+87
|
* Add (web socket frame) module.David Thompson2015-11-071-0/+263