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 7760189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:49:01+00:00 2026-06-01T13:49:01+00:00

I am trying to make a socket.io based server but whenever I connect by

  • 0

I am trying to make a socket.io based server but whenever I connect by client to it using dojo, it shows me this error:

    debug - destroying non-socket.io upgrade

Here’s my server code

var express = require("express");
var io = require("socket.io");
server= express.createServer();
var server_socket = io.listen(server);

server_socket.sockets.on("connection",function(socket)
{
    console.log("connection established");
    socket.emit("message", message);
});

server.listen(8080);

And here’s my client code

require(["dojox/socket"], function (socket)
{
    var args, ws = typeof WebSocket != "undefined";
    var _socket = dojox.socket(args = {
        url: ws ? "ws://localhost:8080/" : "http://localhost:8080",
        headers:{
        "Content-Type":"application/x-www-urlencoded"
         },
        transport: function(args, message){
          args.content = message; // use URL-encoding to send the message
                                  // instead of a raw body
          dojo.xhrPost(args);
         }
    }); 
    websocket = dojox.socket.Reconnect(_socket);
    websocket.on("message",function(data)
    {
       console.log(data);
    });
});

Please help me.

  • 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-01T13:49:02+00:00Added an answer on June 1, 2026 at 1:49 pm

    Socket.io is both a server and client side library for node.js. I’m guessing Dojo’s websocket client is not directly compatible with the socket.io server. I would suggest just using the socket.io client for connections, otherwise you will probably have to modify Dojo’s websocket library which will probably be difficult.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to make a simple Client-Server application but when I execute the
I am trying to make a simple lua socket client for the Socket Server
I'm trying to make a basic client-server application for windows phone 7 (using Mango
I'm trying to make a simple http client server using java. It will show
Have been struggling all day trying to make this simple example work using socket.io.
I'm trying to make a simple UDP client server example in PHP but I
I'm trying to build a simple echo server/client that works on ethernet level(using raw
I am trying to make a socket server that spews mouse move events, in
I'm trying to make the app read data from a socket, but it takes
I'm trying to make a simple server/application in Erlang. My server initialize a socket

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.