summaryrefslogtreecommitdiff
path: root/web/socket/frame.scm
Commit message (Collapse)AuthorAgeFilesLines
* 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-071-8/+69
| | | | | | | | | | | | * 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-211-0/+45
| | | | | | | | | * 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-191-1/+2
| | | | | | | | | * 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.
* frame: Fix typo in error message.David Thompson2016-03-251-1/+1
| | | | * web/socket/frame.scm (read-frame): s/to/too/
* Add missing "Lesser" in licensing comments.David Thompson2015-12-091-3/+3
|
* 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-081-0/+25
|
* frame: Improve doc strings and comments.David Thompson2015-11-081-3/+14
|
* Fix typo.David Thompson2015-11-071-1/+1
|
* Improve frame module.David Thompson2015-11-071-17/+87
|
* Add (web socket frame) module.David Thompson2015-11-071-0/+263