Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Socket.IO in Chess Realtime Multiplayer Web App...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Conferences Box
November 30, 2012
Technology
340
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Socket.IO in Chess Realtime Multiplayer Web Application
Conferences Box
November 30, 2012
More Decks by Conferences Box
See All by Conferences Box
Multiple dispatch
conferencesbox
1
59
JQuery UI Keynote
conferencesbox
1
91
Sensible Testing
conferencesbox
2
88
Redis Application Patterns in Rails
conferencesbox
1
120
Making the Web Faster
conferencesbox
2
78
Using Rails without Rails
conferencesbox
1
110
Stranger in These Parts
conferencesbox
1
63
One day of life in V8
conferencesbox
3
250
Continuous Deployment
conferencesbox
1
100
Other Decks in Technology
See All in Technology
5分でわかるDuckDB Quack
chanyou0311
2
230
いまさら聞けない「仕様駆動開発入門」 〜AI活用時代の開発プロセスを考える〜
findy_eventslides
2
190
ぼっちではじめた登壇が「51名」「241件」の発信に化けた
subroh0508
1
300
GitHub Copilot 最新アップデート – 「一歩先」の実践活用術
moulongzhang
5
1.6k
【FinOps】データドリブンな意思決定を目指して
z63d
0
150
クラウドファンディング版StackChan 3体(4体)をインタラクティブな体験型作品にして展示もした話 / スタックチャンお誕生日会2026
you
PRO
0
180
脱SaaS!FDEを支えるプロビジョニングと分離設計
knih
0
260
螺旋型キャリアの生存戦略 / kinoko-conf2026
rakus_dev
1
900
アジャイルな経理と Claude Code と経営の未来
kawaguti
PRO
3
190
あなたの知らないPDFのアクセシビリティ
lycorptech_jp
PRO
0
240
“詰む”前に仕組みを作れ 〜技術の波に溺れないためのキャッチアップ術〜
takasyou
7
3.6k
AWS Security Agent といっしょに脅威モデリングをやってみよう
amarelo_n24
1
200
Featured
See All Featured
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
320
Designing for humans not robots
tammielis
254
26k
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
HDC tutorial
michielstock
2
720
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
250
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
450
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
For a Future-Friendly Web
brad_frost
183
10k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
370
Music & Morning Musume
bryan
47
7.2k
Transcript
Socket.IO in Chess Realtime Multiplayer Web Application @OmarQunsul
None
None
None
None
None
Websockets
None
Mozilla Firefox 4 in 2010 dropped the support for Websockets,
due to security issues.
What ?
None
http://www.socket.io
WebSocket Adobe® Flash® Socket AJAX long polling AJAX multipart streaming
Forever Iframe JSONP Polling
Server ( node.js ) Socket.IO Client Browser JS
NODE.JS ( Server ) var io = require('socket.io').listen(80); io.sockets.on('connection', function
(socket) { socket.emit('news', { hello: 'world' }); socket.on('my other event', function (data) { console.log(data); }); });
NODE.JS ( Server ) var io = require('socket.io').listen(80); io.sockets.on('connection', function
(socket) { socket.emit('news', { hello: 'world' }); socket.on('my other event', function (data) { console.log(data); }); });
NODE.JS ( Server ) var io = require('socket.io').listen(80); io.sockets.on('connection', function
(socket) { socket.emit('news', { hello: 'world' }); socket.on('my other event', function (data) { console.log(data); }); });
Browser ( Javascript ) <script src="/socket.io/socket.io.js"></script> <script> var socket =
io.connect('http://localhost'); socket.on('news', function (data) { console.log(data); socket.emit('my other event', { my: 'data' }); }); </script>
Browser ( Javascript ) <script src="/socket.io/socket.io.js"></script> <script> var socket =
io.connect('http://localhost'); socket.on('news', function (data) { console.log(data); socket.emit('my other event', { my: 'data' }); }); </script>
Browser ( Javascript ) <script src="/socket.io/socket.io.js"></script> <script> var socket =
io.connect('http://localhost'); socket.on('news', function (data) { console.log(data); socket.emit('my other event', { my: 'data' }); }); </script>
Socket.IO + Express var app = require('express')() , server =
require('http').createServer(app) , io = require('socket.io').listen(server); server.listen(80); app.get('/', function (req, res) { res.sendfile(__dirname + '/index.html'); }); io.sockets.on('connection', function (socket) { socket.emit('news', { hello: 'world' }); socket.on('my other event', function (data) { console.log(data); }); });
C++, Objective C, Ruby, Python, Erlang, Lua, Perl, Go, PHP
... and many more. Unofficial server side implementations
Desktop Internet Explorer 5.5+ ! Safari 3+ Google Chrome 4+
Firefox 3+ Opera 10.61+ Mobile iPhone Safari iPad Safari Android WebKit WebOs WebKit Browser Support
For more information, demos http://socket.io
chessduo.com and oh, my chess website is
Thanks !