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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T18:04:09+00:00 2026-06-03T18:04:09+00:00

I have developed a client/server bi-directional communication using dnode. When a client connects to

  • 0

I have developed a client/server bi-directional communication using dnode.
When a client connects to the server, I keep the connection so the server can use this connection to invoke a method on the client when it needs to.
Sometimes the connection seems to become inactive, I then need to restart the client manually. Could the connection remain active with some specific options ? (I though the reconnect every 3s would do the trick but does not seem to be the case).

The server is like

dnode(function (remote, conn) {

  conn.on('connect', function (){     // THIS METHOD IS NEVER CALLED !!! I DON'T KNOW WHY
    console.log("connection");
  });

  // Connection starts
  conn.on('ready', function () {
      // Keep remote in a hash for later usage
      ...
  });

  // Connection ends
  conn.on('end', function(){
     // Remove remote object from hash
     ...
  });

}).listen(5000);

The client:

// Define client functions
dnode(function (remote, conn) {
    // Ping
    this.ping = function (cb) {
        cb("pong");
    };

    // Other functions
    ...
}).connect(server, port, {'reconnect': 3000});
  • 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-03T18:04:10+00:00Added an answer on June 3, 2026 at 6:04 pm

    Sounds like you could do with upnode, which buffers commands and reconnects dropped dnode connections for you automatically.

    I don’t think the connect event is expected to be fired, because the function you set it up inside is dnode’s ‘on connection’ handler.

    You might also want to check out my enode library, which bundles upnode functionality and IMO, makes the dnode api more intuitive. It also maintains a list of active connections, handles Error objects better and simplifies disconnection and closing.

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

Sidebar

Related Questions

Ok, I have developed this WinForms client, which interacts with a server (ASPX Application)
I have a webserver application developed using idHttpServer. When a client connects do my
I have developed a java swing client-server application. The server has many services like
I have Client-Server environment and developed a project for Client-Server. I need to share
I have a 3rd party client/server application, not developed by me, who needs to
I have developed an application using VB.NET, Visual Studio 2008 and the SQL Server
I have developed a small server that recives connections (using basically the example here:
I have developed a Java socket server connection which is working fine. When started
I have developed an application using Delphi and Firebird 1.5, where the server is
I have developed a Client/Server application for my current employer and one of the

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.