209

I am very new to the world of webdevelopment and jumped into the bandwagon because I find the concept of HTML5 very interesting. I am fairly confident on working with canvas and would now like to move over to websockets part of it. I have come to understand socket.io is by far the framework to work with, when we want to work with web sockets.

Any pointers on what tutorial and examples to refer to for a total dummy would be very appreciated!

Vivek S.
  • 19,945
  • 7
  • 68
  • 85
Shouvik
  • 11,350
  • 16
  • 58
  • 89
  • Its not incorrect, its a matter of prespective... I learnt usign the sources mentioned.. And I do know my way around it... Feel free to ask any thing you don't understand... – Shouvik Apr 30 '12 at 20:53
  • It's not a matter of perspective. It's flat incorrect. Too many important details are missing. If you take an advanced math class, and you don't show your work, the teacher will not give you a pass. Adults are expected to be able to show their work. There's no way to justify not showing all of the required steps in a tutorial for a user to be able to recreate the result, consistently, on the spec machine. There's no perspectivizing about it. It's objectively an incorrect answer, even if there's a subjective element to all measures. 2+2 can equal 5; however, in arithmetic that's wrong. – Wolfpack'08 May 01 '12 at 12:47
  • 2
    Write a correct answer I will accept that... Thats the best I can do, tell me who has a better answer than the one I accepted posted here? – Shouvik May 04 '12 at 20:07
  • 74
    I don't see a point in closing the question. It servers as a great place for people to post links relating to new and interesting projects for learning socket.io/nodejs and hopefully add value to the combination of answers. Since there has been just one instance of a person disagreeing with the answer selected doesn't entitle to close the question. I vote to reopen. – Shouvik Jun 05 '12 at 12:32
  • 2
    awesome tutorial http://psitsmike.com/2011/09/node-js-and-socket-io-chat-tutorial/ – julian Feb 26 '13 at 15:36
  • My intro on the subject: https://divillysausages.com/2015/07/12/an-intro-to-socket-io/ I only submit as a lot of people seem to find it useful – divillysausages Oct 17 '16 at 15:08
  • I found [this](http://www.tutorialspoint.com/socket.io/) tutorial very useful – Vivek S. Sep 18 '17 at 12:59
  • From the upvotes of this question and answers, lots of people get help here. Why closing this question? – CodingNow Jun 29 '18 at 13:39

3 Answers3

148

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

Official tutorial https://socket.io/get-started/chat

D P Venkatesh
  • 529
  • 7
  • 15
FR6
  • 3,157
  • 3
  • 24
  • 28
  • 1
    I thought you may want to know that the server side link in turn links to https://github.com/learnboost/socket.io, apparently the repository name has been changed. This also appears to be the same site as the client side link already, perhaps they merged the two? – trevorKirkby Jan 10 '14 at 22:26
18

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

250R
  • 35,945
  • 7
  • 33
  • 25
7

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

DMin
  • 10,049
  • 10
  • 45
  • 65
Liam
  • 2,017
  • 3
  • 22
  • 19
  • Node chat works from client-to-client, but there's no example of how to send messages from the server. The second tutorial is incomplete (part 1 and no part 2). – Wolfpack'08 Apr 30 '12 at 00:46
  • The second link (getting-your-feet-wet) is dead. – khiner Jun 08 '13 at 21:35