websocket: Initial <websocket> client actor support.
authorJan (janneke) Nieuwenhuizen <janneke@gnu.org>
Mon, 22 Apr 2019 17:03:37 +0000 (19:03 +0200)
committerJan (janneke) Nieuwenhuizen <janneke@gnu.org>
Thu, 18 Mar 2021 21:51:44 +0000 (22:51 +0100)
commit9f0c24e3e0f610303b9af8ff979c8e4408713cc8
tree6675d0b91700b523de6c1eade93b848ed8523800
parent183b4f02e68279d4984e79b79e06bfcf1861fcbf
websocket: Initial <websocket> client actor support.

* 8sync/systems/websocket/client.scm (no-op): New procedure.
(<websocket>): Change from record to actor and use it.
(websocket-init): New method.
(set-nonblocking!): New procedure.
(make-client-socket): Use it.
(make-websocket): Rename to...
(websocket-open): ...this new method and change accordingly.
(close-websocket): Rename to ...
(websocket-close): ...this new method and change accordingly.
(handshake, websocket-send, websocket-connecting, websocket-open?,
websocket-closing?, websocket-closed?): Change to method and update
accordingly.
(display-websocket): Move to...
(write)[<websocket]: ...this new specialization.
(set-record-type-printer!): Remove.
(websocket-loop): Renamed from...
* 8sync/systems/websocket/server.scm (websocket-client-loop): ...here.
(make-websocket-actor): New procedure.
(<websocket-server>): Call it for websocket upgrade, create new
<websocket> actor.
* demos/websocket/8s-client.scm,
demos/websocket/8s-server.scm,
demos/websocket/ws-client.js,
demos/websocket/ws-server.js: New files.
* Makefile.am (EXTRA_DIST): Add them.
8sync/systems/websocket/client.scm
8sync/systems/websocket/server.scm
Makefile.am
demos/websocket/8s-client.scm [new file with mode: 0755]
demos/websocket/8s-server.scm [new file with mode: 0755]
demos/websocket/node-client.js [new file with mode: 0644]
demos/websocket/ws-client.html [new file with mode: 0644]
demos/websocket/ws-client.js [new file with mode: 0755]
demos/websocket/ws-server.js [new file with mode: 0755]