Sample code for this demo<br />var p = new Plug(‘ws://onmessage.ws/msgpack_chat’, ‘plug.msgpack.js’);<br />p.onmessage = f...
msgpack_chat.html<br />plug.js<br />plug.msgpack.js<br />msgpack.codec.js<br />File Relationships<br /><script type=‘text/...
msgpack_chat.html<br />DATA flow for send<br />p.send(‘Hello’);<br />msgpack.pack(‘Hello’).toString();<br />1<br /> ‘Hello...
DATA flow for recv<br />p.onmessage = function(e) {<br />   alert(e.data); // === ‘Hello’<br />};<br />msgpack_chat.html<b...
msgpack_rpc_client.html<br />msgpack.rpc.client.js<br />plug.js<br />plug.msgpack.js<br />msgpack.codec.js<br />Next Targe...
ssh_client.html<br />ssh.client.js etc.<br />Implement several network protos by Javascript<br />plug.js<br />plug.ssh.js ...
proto.client.js<br />mod_websocket for lighty can realize this world!<br />Lighty w/ mod_websocket<br />MessagePack::RPC::...
Lack to realize…<br />Browser support for WebSocket.{send,onmessage}(ArrayBuffer)<br />Implementation of Stream desirializ...
Upcoming SlideShare
Loading in …5
×

Supplemental explanation WebSocket Demo.

2,283 views

Published on

a brief of http://onmessage.ws/demos/msgpack_chat/

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,283
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Supplemental explanation WebSocket Demo.

  1. 1. Sample code for this demo<br />var p = new Plug(‘ws://onmessage.ws/msgpack_chat’, ‘plug.msgpack.js’);<br />p.onmessage = function(e) {<br />alert(e.data);<br />}<br />p.connect();<br />p.send(‘Hello’);<br />p.disconnect();<br />
  2. 2. msgpack_chat.html<br />plug.js<br />plug.msgpack.js<br />msgpack.codec.js<br />File Relationships<br /><script type=‘text/javascript’ src=‘plug.js’><br />includes automatically.<br />(but not resolve dependencies this time)<br />Impremented by uupaa-san<br />https://github.com/uupaa/msgpack.js<br />
  3. 3. msgpack_chat.html<br />DATA flow for send<br />p.send(‘Hello’);<br />msgpack.pack(‘Hello’).toString();<br />1<br /> ‘Hello’<br />‘Hello’<br />2<br />3<br />plug.js<br />plug.msgpack.js<br />msgpack.codec.js<br />5<br />4<br />‘165, 72, 101, 108, 108, 111’<br />WebSocket.send(Array.toString())<br />Because of hybi-00 spec can send only text.<br />‘165, 72, 101, 108, 108, 111’<br />chatserver<br />
  4. 4. DATA flow for recv<br />p.onmessage = function(e) {<br /> alert(e.data); // === ‘Hello’<br />};<br />msgpack_chat.html<br />5<br /> ‘Hello’<br />4<br /> ‘Hello’<br />2<br />3<br />plug.js<br />plug.msgpack.js<br />msgpack.codec.js<br />1<br />‘165, 72, 101, 108, 108, 111’<br />chatserver<br />Make array from CSV String.<br />msgpack.unpack([165, 72, 101, 108, 108, 111]);<br />
  5. 5. msgpack_rpc_client.html<br />msgpack.rpc.client.js<br />plug.js<br />plug.msgpack.js<br />msgpack.codec.js<br />Next Target<br />
  6. 6. ssh_client.html<br />ssh.client.js etc.<br />Implement several network protos by Javascript<br />plug.js<br />plug.ssh.js etc.<br />Future Target<br />
  7. 7. proto.client.js<br />mod_websocket for lighty can realize this world!<br />Lighty w/ mod_websocket<br />MessagePack::RPC::Server<br />SSHd<br />SMTPd<br />・・・<br />You can plug several existing TCP Servers only with writing Javascript Code!<br />And also can plug special servers if you write ServerSide.<br />
  8. 8. Lack to realize…<br />Browser support for WebSocket.{send,onmessage}(ArrayBuffer)<br />Implementation of Stream desirializer by Javascript for MessagePack<br />And also<br />my knowledge<br />time<br />

×