Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Supplemental explanation WebSocket Demo.
1. Sample code for this demo var p = new Plug(‘ws://onmessage.ws/msgpack_chat’, ‘plug.msgpack.js’); p.onmessage = function(e) { alert(e.data); } p.connect(); p.send(‘Hello’); p.disconnect();
2. msgpack_chat.html plug.js plug.msgpack.js msgpack.codec.js File Relationships <script type=‘text/javascript’ src=‘plug.js’> includes automatically. (but not resolve dependencies this time) Impremented by uupaa-san https://github.com/uupaa/msgpack.js
3. msgpack_chat.html DATA flow for send p.send(‘Hello’); msgpack.pack(‘Hello’).toString(); 1 ‘Hello’ ‘Hello’ 2 3 plug.js plug.msgpack.js msgpack.codec.js 5 4 ‘165, 72, 101, 108, 108, 111’ WebSocket.send(Array.toString()) Because of hybi-00 spec can send only text. ‘165, 72, 101, 108, 108, 111’ chatserver
7. proto.client.js mod_websocket for lighty can realize this world! Lighty w/ mod_websocket MessagePack::RPC::Server SSHd SMTPd ・・・ You can plug several existing TCP Servers only with writing Javascript Code! And also can plug special servers if you write ServerSide.
8. Lack to realize… Browser support for WebSocket.{send,onmessage}(ArrayBuffer) Implementation of Stream desirializer by Javascript for MessagePack And also my knowledge time