Socket communications in a web browser with node.js and socket.io
Code for this tutorial can be downloaded from https://github.com/Sean-Bradley/socket.io-tutorial
In this quick demo I send data using html sockets from the
Server to the client,
the client to the server
and then to and from each other.
The sections of the video show,
1. @1:15 The server calling a function on the client
2. @2:00 The server calling a function on the client and passing in a number parameter
3. @2:55 The server calling a function on the client and passing in a string parameter
4. @3:25 The server calling a function on the client and passing in an object parameter
5. @4:25 The client calling a function on the server
6. @5:10 The client calling a function on the server and passing a parameter
7. @5:36 The client calling a function on the server and passing an object parameter
8. @6:10 Ping Pong, where the client and server keep exchanging messages in sequence,
9. @7:45 setTimeout, where the server and client pause for a few seconds before responding
10. @10:40 setInterval, where the server resends a message at a set timed interval.