Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Good beginners tutorial to socket.io? [closed]

People also ask

Is learning Socket.IO hard?

All in all, the Socket.io code was incredibly simple. My app. js for my Express app is below — it simply listens for connections and pixels changing colors. Below that, I attached my App.

Is Socket.IO good for chat?

So as we all know Socket.io is the best solution for instant messaging app and its reliability.

Which is better Socket.IO or pusher?

Pusher is the category leader in delightful APIs for app developers building communication and collaboration features. On the other hand, Socket.IO is detailed as "Realtime application framework (Node. JS server)". Socket.IO enables real-time bidirectional event-based communication.


To start with Socket.IO I suggest you read first the example on the main page:

http://socket.io/

On the server side, read the "How to use" on the GitHub source page:

https://github.com/Automattic/socket.io

And on the client side:

https://github.com/Automattic/socket.io-client

Finally you need to read this great tutorial:

http://howtonode.org/websockets-socketio

Hint: At the end of this blog post, you will have some links pointing on source code that could be some help.


A 'fun' way to learn socket.io is to play BrowserQuest by mozilla and look at its source code :-)

http://browserquest.mozilla.org/

https://github.com/mozilla/BrowserQuest


I found these two links very helpful while I was trying to learn socket.io:

  • http://fzysqr.com/2011/02/28/nodechat-js-using-node-js-backbone-js-socket-io-and-redis-to-make-a-real-time-chat-app/
  • http://thecoffman.com/2011/02/21/getting-your-feet-wet-with-node.js-and-socket.io/