1 / 9

Nodejs & Socket IO

Nodejs &amp; Socket IO. Jose Chang. Nodejs. Server side javascript Event-driven Non-blocking I/O. Nodejs sample. var http = require('http'); var s = http.createServer (function ( req , res) { res.writeHead (200, {'content-type': 'text/plain' }); res.end (‘ hello world <br> '); });

morton
Download Presentation

Nodejs &amp; Socket IO

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Nodejs & Socket IO Jose Chang

  2. Nodejs • Server side javascript • Event-driven • Non-blocking I/O

  3. Nodejs sample var http = require('http'); var s = http.createServer(function (req, res) { res.writeHead(200, {'content-type': 'text/plain' }); res.end(‘hello world\n'); }); s.listen(8083); o

  4. Socket IO • A nodejs module • The cross-browser WebSocket for realtime apps. • Desktop: • Internet Explorer 5.5+ • Safari 3+ • Google Chrome 4+ • Firefox 3+ • Opera 10.61+ • Mobile: • iPhone Safari • iPad Safari • Android WebKit • WebOsWebKit

  5. Socket IO sample Server.js: Client.html: o Ref: http://socket.io/

  6. Demo http://140.96.29.30/nodejs-svn/socketio/chatApp2/index.html

  7. Phone.html?key=OOOOO Index.html Auto generate key and pass key by URL parameter. Connect Connect Event with key Event with key Server.js

  8. Reference • Learning • DailyJS’s Node Tutorial • Mixu’s Node Book • Node Beginner Book • How To Node • Framework • Express • Testing • nodeunit • Logging • Winston • IDE • Nide • cloud 9

  9. Thank you

More Related