Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using / Implementation of Web Sockets Server side

I am new to Web Sockets and I want to know how the web sockets is being implemented at the server side?.. for client side I can write onmessage() etc in html5...JavaScript etc... But for server side I have so many options. I am confused how to implement it in server side and how can I write a server side code either in JavaScript or C through node.js or npm or web sockets.io?? how can i install them or is there any sdk ..what is the installation procedure ?

Thanks
Sneha

like image 721
Smitha Avatar asked Dec 04 '25 15:12

Smitha


1 Answers

Most of the server-side options you mention in your question are related to the same technology, namely node.js.

  1. node.js is a server-side JavaScript solution based on Google's v8 engine designed for building scalable web-applications
  2. npm is a package manager for node which allows you to install and publish node programs and manage their dependencies. It's similar in some ways to the package managers available on some linux distributions (rpm and apt for example).
  3. socket.io is a plug-in for node.js for developing real time applications. It selects the most suitable transport mechanism for the client but hides the details behind a single API.

If you're building a real-time application I can definitely recommend looking in more detail at node and socket.io.

The node download page has installers for Windows and Mac, and there are various guides to installing node on Ubuntu.

like image 152
net.uk.sweet Avatar answered Dec 06 '25 03:12

net.uk.sweet



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!