SlideShare ist ein Scribd-Unternehmen logo
1 von 8
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();
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
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
DATA flow for recv p.onmessage = function(e) {    alert(e.data); // === ‘Hello’ }; msgpack_chat.html 5  ‘Hello’ 4  ‘Hello’ 2 3 plug.js plug.msgpack.js msgpack.codec.js 1 ‘165, 72, 101, 108, 108, 111’ chatserver Make array from CSV String. msgpack.unpack([165, 72, 101, 108, 108, 111]);
msgpack_rpc_client.html msgpack.rpc.client.js plug.js plug.msgpack.js msgpack.codec.js Next Target
ssh_client.html ssh.client.js etc. Implement several network protos by Javascript plug.js plug.ssh.js etc. Future Target
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.
Lack to realize… Browser support for WebSocket.{send,onmessage}(ArrayBuffer) Implementation of Stream desirializer by Javascript for MessagePack And also my knowledge time

Weitere ähnliche Inhalte

Was ist angesagt?

FOSDEM 2012: Practical implementation of promise theory in CFEngine
FOSDEM 2012: Practical implementation of promise theory in CFEngineFOSDEM 2012: Practical implementation of promise theory in CFEngine
FOSDEM 2012: Practical implementation of promise theory in CFEngine
dottedmag
 
Puppet camp Portland 2015: -windows (1)
Puppet camp Portland 2015: -windows (1)Puppet camp Portland 2015: -windows (1)
Puppet camp Portland 2015: -windows (1)
Puppet
 
Open Social Data (Jaca), Alejandro Rivero
Open Social Data (Jaca), Alejandro RiveroOpen Social Data (Jaca), Alejandro Rivero
Open Social Data (Jaca), Alejandro Rivero
Aragón Open Data
 
Unity and WebSockets
Unity and WebSocketsUnity and WebSockets
Unity and WebSockets
Josh Glover
 

Was ist angesagt? (20)

Selenium sandwich-2
Selenium sandwich-2Selenium sandwich-2
Selenium sandwich-2
 
Any event intro
Any event introAny event intro
Any event intro
 
Mangling
Mangling Mangling
Mangling
 
FOSDEM 2012: Practical implementation of promise theory in CFEngine
FOSDEM 2012: Practical implementation of promise theory in CFEngineFOSDEM 2012: Practical implementation of promise theory in CFEngine
FOSDEM 2012: Practical implementation of promise theory in CFEngine
 
Chromium Embedded Framework + Go at Brooklyn JS
Chromium Embedded Framework + Go at Brooklyn JSChromium Embedded Framework + Go at Brooklyn JS
Chromium Embedded Framework + Go at Brooklyn JS
 
SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)
 
The MetaCPAN VM Part II (Using the VM)
The MetaCPAN VM Part II (Using the VM)The MetaCPAN VM Part II (Using the VM)
The MetaCPAN VM Part II (Using the VM)
 
{ jscamp : "Hannam" } Qunit Test Automation using Hudson and Selenium - 김민종
{ jscamp : "Hannam" } Qunit Test Automation using Hudson and Selenium - 김민종{ jscamp : "Hannam" } Qunit Test Automation using Hudson and Selenium - 김민종
{ jscamp : "Hannam" } Qunit Test Automation using Hudson and Selenium - 김민종
 
Demo for Why Use PowerShell
Demo for Why Use PowerShellDemo for Why Use PowerShell
Demo for Why Use PowerShell
 
Hunting for malicious modules in npm - NodeSummit
Hunting for malicious modules in npm - NodeSummitHunting for malicious modules in npm - NodeSummit
Hunting for malicious modules in npm - NodeSummit
 
Firewall filters
Firewall filtersFirewall filters
Firewall filters
 
Realtime Analytics Using MongoDB, Python, Gevent, and ZeroMQ
Realtime Analytics Using MongoDB, Python, Gevent, and ZeroMQRealtime Analytics Using MongoDB, Python, Gevent, and ZeroMQ
Realtime Analytics Using MongoDB, Python, Gevent, and ZeroMQ
 
FluentLeniumで困った話
FluentLeniumで困った話FluentLeniumで困った話
FluentLeniumで困った話
 
Puppet camp Portland 2015: -windows (1)
Puppet camp Portland 2015: -windows (1)Puppet camp Portland 2015: -windows (1)
Puppet camp Portland 2015: -windows (1)
 
Develop and Deploy your JavaEE micro service in less than 5 minutes with Apac...
Develop and Deploy your JavaEE micro service in less than 5 minutes with Apac...Develop and Deploy your JavaEE micro service in less than 5 minutes with Apac...
Develop and Deploy your JavaEE micro service in less than 5 minutes with Apac...
 
Open Social Data (Jaca), Alejandro Rivero
Open Social Data (Jaca), Alejandro RiveroOpen Social Data (Jaca), Alejandro Rivero
Open Social Data (Jaca), Alejandro Rivero
 
App-o-Lockalypse now!
App-o-Lockalypse now!App-o-Lockalypse now!
App-o-Lockalypse now!
 
Tres Gemas De Ruby
Tres Gemas De RubyTres Gemas De Ruby
Tres Gemas De Ruby
 
Source Plugins
Source PluginsSource Plugins
Source Plugins
 
Unity and WebSockets
Unity and WebSocketsUnity and WebSockets
Unity and WebSockets
 

Andere mochten auch

Asmahan Saadeldin Salih Mohamed cv
Asmahan Saadeldin Salih Mohamed cv Asmahan Saadeldin Salih Mohamed cv
Asmahan Saadeldin Salih Mohamed cv
Asmahan Salih
 
Who Declares International Concern Over Swine Flu
Who Declares International Concern Over Swine FluWho Declares International Concern Over Swine Flu
Who Declares International Concern Over Swine Flu
NATURE 4EVER
 
Rosemary Marsh cv final
Rosemary Marsh cv final Rosemary Marsh cv final
Rosemary Marsh cv final
Rosemary Marsh
 
FINAL CV RESUME edited
FINAL CV RESUME editedFINAL CV RESUME edited
FINAL CV RESUME edited
mahendra shah
 

Andere mochten auch (14)

Automotive trainer persoonlijke training - Sander De Clerck.
Automotive trainer  persoonlijke training - Sander De Clerck.Automotive trainer  persoonlijke training - Sander De Clerck.
Automotive trainer persoonlijke training - Sander De Clerck.
 
Asmahan Saadeldin Salih Mohamed cv
Asmahan Saadeldin Salih Mohamed cv Asmahan Saadeldin Salih Mohamed cv
Asmahan Saadeldin Salih Mohamed cv
 
Software-Native metrics: Depsy lessons learned
Software-Native metrics: Depsy lessons learnedSoftware-Native metrics: Depsy lessons learned
Software-Native metrics: Depsy lessons learned
 
Who Declares International Concern Over Swine Flu
Who Declares International Concern Over Swine FluWho Declares International Concern Over Swine Flu
Who Declares International Concern Over Swine Flu
 
কার্যপত্র Lecturer 54
কার্যপত্র Lecturer 54কার্যপত্র Lecturer 54
কার্যপত্র Lecturer 54
 
It all started with a mouse - A case study on disney
It all started with a mouse - A case study on disneyIt all started with a mouse - A case study on disney
It all started with a mouse - A case study on disney
 
DoRoad by 市川電産 (Hackcars day 2015)
DoRoad by 市川電産 (Hackcars day 2015)DoRoad by 市川電産 (Hackcars day 2015)
DoRoad by 市川電産 (Hackcars day 2015)
 
Rosemary Marsh cv final
Rosemary Marsh cv final Rosemary Marsh cv final
Rosemary Marsh cv final
 
Neuro ex
Neuro exNeuro ex
Neuro ex
 
English Day la Garrotxa 2017. Groups
English Day la Garrotxa 2017. GroupsEnglish Day la Garrotxa 2017. Groups
English Day la Garrotxa 2017. Groups
 
The South African Journal of Science - iThenticate
The South African Journal of Science - iThenticateThe South African Journal of Science - iThenticate
The South African Journal of Science - iThenticate
 
Communication Soft Skills
Communication Soft SkillsCommunication Soft Skills
Communication Soft Skills
 
Social contexts of second language acquisition
Social contexts of second language acquisitionSocial contexts of second language acquisition
Social contexts of second language acquisition
 
FINAL CV RESUME edited
FINAL CV RESUME editedFINAL CV RESUME edited
FINAL CV RESUME edited
 

Ähnlich wie Supplemental explanation WebSocket Demo.

09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
Igor Bronovskyy
 
Real-Time Python Web: Gevent and Socket.io
Real-Time Python Web: Gevent and Socket.ioReal-Time Python Web: Gevent and Socket.io
Real-Time Python Web: Gevent and Socket.io
Rick Copeland
 
Thread介紹
Thread介紹Thread介紹
Thread介紹
Jack Chen
 
parenscript-tutorial
parenscript-tutorialparenscript-tutorial
parenscript-tutorial
tutorialsruby
 
parenscript-tutorial
parenscript-tutorialparenscript-tutorial
parenscript-tutorial
tutorialsruby
 

Ähnlich wie Supplemental explanation WebSocket Demo. (20)

Gpars concepts explained
Gpars concepts explainedGpars concepts explained
Gpars concepts explained
 
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
 
Real-Time Python Web: Gevent and Socket.io
Real-Time Python Web: Gevent and Socket.ioReal-Time Python Web: Gevent and Socket.io
Real-Time Python Web: Gevent and Socket.io
 
Security Challenges in Node.js
Security Challenges in Node.jsSecurity Challenges in Node.js
Security Challenges in Node.js
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentation
 
Charla EHU Noviembre 2014 - Desarrollo Web
Charla EHU Noviembre 2014 - Desarrollo WebCharla EHU Noviembre 2014 - Desarrollo Web
Charla EHU Noviembre 2014 - Desarrollo Web
 
Ajax
AjaxAjax
Ajax
 
Boost your testing: End-to-End with Docker and Geb
 Boost your testing: End-to-End with Docker and Geb Boost your testing: End-to-End with Docker and Geb
Boost your testing: End-to-End with Docker and Geb
 
Introduction to Vert.x
Introduction to Vert.xIntroduction to Vert.x
Introduction to Vert.x
 
Thread介紹
Thread介紹Thread介紹
Thread介紹
 
Blockly
BlocklyBlockly
Blockly
 
KSDG-iSlide App 開發心得分享
KSDG-iSlide App 開發心得分享KSDG-iSlide App 開發心得分享
KSDG-iSlide App 開發心得分享
 
Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008
 
A few good JavaScript development tools
A few good JavaScript development toolsA few good JavaScript development tools
A few good JavaScript development tools
 
Learning Java 4 – Swing, SQL, and Security API
Learning Java 4 – Swing, SQL, and Security APILearning Java 4 – Swing, SQL, and Security API
Learning Java 4 – Swing, SQL, and Security API
 
ES6 is Nigh
ES6 is NighES6 is Nigh
ES6 is Nigh
 
The Real Time Web with XMPP
The Real Time Web with XMPPThe Real Time Web with XMPP
The Real Time Web with XMPP
 
Twig Templating
Twig TemplatingTwig Templating
Twig Templating
 
parenscript-tutorial
parenscript-tutorialparenscript-tutorial
parenscript-tutorial
 
parenscript-tutorial
parenscript-tutorialparenscript-tutorial
parenscript-tutorial
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 

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
  • 4. DATA flow for recv p.onmessage = function(e) { alert(e.data); // === ‘Hello’ }; msgpack_chat.html 5 ‘Hello’ 4 ‘Hello’ 2 3 plug.js plug.msgpack.js msgpack.codec.js 1 ‘165, 72, 101, 108, 108, 111’ chatserver Make array from CSV String. msgpack.unpack([165, 72, 101, 108, 108, 111]);
  • 5. msgpack_rpc_client.html msgpack.rpc.client.js plug.js plug.msgpack.js msgpack.codec.js Next Target
  • 6. ssh_client.html ssh.client.js etc. Implement several network protos by Javascript plug.js plug.ssh.js etc. Future Target
  • 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