Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8053915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T08:00:30+00:00 2026-06-05T08:00:30+00:00

i am new to web sockets and node .. I am confused with different

  • 0

i am new to web sockets and node .. I am confused with different terminologies used with node.js. Few places it’s mentioned it’s a tool, few others it’s a JavaScript program / any platform or some times it’s an sdk at server side. Please tell me what exactly is this ode.js?

How do i write program using websockets.io in windows machine (server-side) for a client app written using web sockets. Or is there any better implementation than websockets.io for producing a faster response.. or high speed?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T08:00:33+00:00Added an answer on June 5, 2026 at 8:00 am

    first of all you need to install “exress” module to use socket.io [for simplicity you should use “express”. otherwise you can implement socket.io by other way too.]

    To install express write in your terminal

    npm install express
    

    Then install socket.io module for that you should write in teminal

    npm install socket.io
    

    Make file app.js
    Write code as below

     var express = require('express')
      , stylus = require('stylus')
      , nib = require('nib')
      , sio = require('socket.io');
    
    app.listen(3001);
    var io = sio.listen(app);
    
    app.get('/', function (req, res) {
       res.redirect('/views/index.html');
    });
    
    io.sockets.on('connection', function (socket) {
          socket.emit('hi',{"This is first Message from socket.io"});
    });
    

    Then make file index.html in views folder

    in it write

    <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.1.min.js" > </script>
    <script type="text/javascript" src="/socket.io/socket.io.js" ></script>
    
        <script>
             $(function(){
              var socket = io.connect();
                  socket.on('hi',function(Message){
                       alert(Message); // Will alert "This is first Message from socket.io"
                  });
             });
        </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm very interested in learning about the new feature in HTML5 called web sockets.
I am using node.js socket.io-client and socket.io . I have a javascript program which
Every new web service you create using visual studio comes with a predefined namespace
I'm building a new web app that has a requirement to generate an internal
I'm designing a new web application and I'm aware that the process of registration
I have designed a new web site. I have hosted it online. I want
we are implementing a new web service. The web service will be a store
We are programming a new web application framework ( Second WAF ). I was
I have started a new web application and have decided to use jquery as
I am building a new web-app, LAMP environment... I am wondering if preg_match can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.