summaryrefslogtreecommitdiff
path: root/web/socket/client.scm
Commit message (Collapse)AuthorAgeFilesLines
* client: Support secure websockets.Andrew Whatson2023-04-191-20/+25
| | | | | | | | | * 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.
* 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.
* 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.
* 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.
* 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.
* Add client module.David Thompson2016-03-241-0/+143