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>
Sat, 7 Nov 2020 10:49:34 +0000 (11:49 +0100)
commitab7d0294d28fa686226e714a606c102e1f265a41
tree0ccd69f8795670a23a5598a5867ec43a1e0c2b9b
parent5074289a33640bb3bd78a711d7ceb645d7ae0cfd
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]