Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Socket.IO in Chess Realtime Multiplayer Web App...
Search
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
64
JQuery UI Keynote
conferencesbox
1
95
Sensible Testing
conferencesbox
2
110
Redis Application Patterns in Rails
conferencesbox
1
130
Making the Web Faster
conferencesbox
2
80
Using Rails without Rails
conferencesbox
1
110
Stranger in These Parts
conferencesbox
1
74
One day of life in V8
conferencesbox
3
260
Continuous Deployment
conferencesbox
1
100
Other Decks in Technology
See All in Technology
TinyGo 開発サイクルを高速化する:Go で作るエミュレータ入門
zozotech
PRO
1
740
aws-iot-platform-architecture-use-cases.pdf
ma2shita
0
160
あるけみー式LTスライド作成術
alchemy1115
1
210
The Agent Builder Loop from Daily Work to OSS
minorun365
PRO
3
200
DEFCON34-Write-up_HYCu-MYCu
daikiokazaki
0
160
データ_AIの事業の勝敗をわけるもの
nek0128
0
360
SREは、MCPとAutopilotをこう使え!
kazumax55
2
810
今話題のAI「Jev」って何? 宇宙最速で学ぶ会
minorun365
PRO
22
13k
What the customer really needed
kawaguti
PRO
2
180
Omarchy Quattro の日本語設定周り
simosako
2
180
現場で役立つ技術負債の効果的な返済方法
masuda220
PRO
8
4.1k
10Xに技術的負債をもたらした「2つの境界の歪み」その構造と解消への営み
10xinc
0
1.9k
Featured
See All Featured
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
690
Bash Introduction
62gerente
615
220k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
300
ラッコキーワード サービス紹介資料
rakko
1
4.9M
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
460
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
460
30 Presentation Tips
portentint
PRO
1
390
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Making the Leap to Tech Lead
cromwellryan
135
10k
We Have a Design System, Now What?
morganepeng
55
8.3k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
320
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
570
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 !