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

  • Home
  • SEARCH
  • 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 7597341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T22:08:02+00:00 2026-05-30T22:08:02+00:00

I have a problem with socket.io. This error: warn – client not handshaken client

  • 0

I have a problem with socket.io.

This error: warn – client not handshaken client should reconnect

In the console I have a list of errors:

debug - setting poll timeout
   debug - clearing poll timeout
   debug - xhr-polling writing 7:::1+0
   debug - set close timeout for client 17348980511779302969
   warn  - client not handshaken client should reconnect
   info  - transport end

I have this simple application:

require.paths.unshift(__dirname + '/../../lib/');

var express = require('express');
var app = express.createServer();
var io = require('socket.io').listen(app);
var stylus = require('stylus');
var mysql = require('mysql');

app.use(express.bodyParser());
app.use(express.cookieParser());

app.use(stylus.middleware({ src: __dirname + '/public', compile: compile }))
app.use(express.static(__dirname + '/public'));
app.set('views', __dirname);

app.set("view options", { layout: false });

app.register('.html', {
    compile: function (str, options) {
        return function (locals) {
            return str;
        };
    }
});

function compile(str, path) {
    return stylus(str)
      .set('filename', path)
      .use(nib());
};

app.get('/', function (req, res) {
res.render('index.html', { layout: false });
});


io.configure(function () {
    io.set('transports', ['websocket','flashsocket','xhr-polling']);
    io.set('polling duration', '10');
});

io.sockets.on('connection', function (socket) {

    console.log("Connect with ID: " + socket.id);   

    socket.emit("sendid", {id: socket.id});

    socket.on('disconnect', function () {
        console.log("Disconnect with ID: " + socket.id);
    });

});

app.listen(3000);

CLIENT CODE:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <title>Socket.IO - test</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <script src="/socket.io/socket.io.js" type="text/javascript"></script>
    <script type="text/javascript">

        var WEB_SOCKET_SWF_LOCATION = './WebSocketMain.swf';

    var socket = io.connect(null, {
            'connect timeout': 500,
            'reconnect': true,
            'reconnection delay': 500,
            'reopen delay': 500,
            'max reconnection attempts': 10
        });

    socket.on('sendid', function (data) {
            alert("Your socket ID is: " + data.id);
        });

    </script>
</head>
<body>
Test socket.io.
</body>
</html>
  • 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-05-30T22:08:04+00:00Added an answer on May 30, 2026 at 10:08 pm

    i have downloaded the latest version of the socket.io and socket.io-client.

    I set the URL and port for connection to socket.io – on the client side.

     var socket = io.connect('http://domain.com:port', {
                'connect timeout': 500,
                'reconnect': true,
                'reconnection delay': 500,
                'reopen delay': 500,
                'max reconnection attempts': 10
            });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

so - I have this Socket (not XMLSocket, just Socket) client. I also have
I have a troublesome problem socket.error error: [Errno 10048]: Address already in use. Only
I have got this error message: #2002 - The server is not responding (or
I have a problem with a Socket connection closing too fast. I was told
I have one problem, I learn how work with socket and I write programm
I have problem compilin this code..can anyone tell whats wrong with the syntax CREATE
I have problem with reading buffer, when reading is not completed. If the received
I have this error which happen many times on my site: A network-related or
How do I alleviate the Could not open socket error that is happening on
Originally: I thought this was a circular reference problem........turns out it's not. The problem

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.