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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:35:03+00:00 2026-06-13T13:35:03+00:00

I have a C# applications which acts like a client and it can be

  • 0

I have a C# applications which acts like a client and it can be installed on any system which is directly connected to public internet (through data cards or port forwarding) or they can be behind router also (without port forwarding).

The other application which is developed using java acts like a server application which is on the public internet. Now, my java application wants to push a message to C# application which is behind router. Java application has the clients public and private (192.168.x.x) IP address. Java application is supposed to run 24×7.

So, now there are two options for me:

  1. Whenever c# application starts it will establish a socket connection with java application and this socket connection will remain open till C# application gets closed.

  2. Whenever Java application has something for C# application it will create a socket connection with C# application then it will push the message and then close the connection.

Now, with 1st option there is a problem that there will be lots of unnecessary connection since there can be thousands of client application and it may happen that on some day there will be nothing to push for some clients. and I don’t know how to go for 2nd option.

What will be the right way to accomplish this task (option 1 or 2)?

Is UPnP protocol right for 2nd option? What are the open source UPnP libraries which has both the API’s (C# and Java). I found one such called ohnet. Will it be a right thing for me? I didn’t found a single small example for OhNet to test.

  • 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-13T13:35:05+00:00Added an answer on June 13, 2026 at 1:35 pm

    2) is not feasible if you don’t have control over network configuration at the client end. It won’t in general be possible for the server to make connections to the client if the client is behind any moderately secure firewall / router.

    So you will in general have have to go for some variant of 1) where the client creates a connection to the server.

    You don’t necessarily have to keep the connection open though – it’s always possible to get the client to poll the server periodically to check if there are any new updates.

    If you want realtime updates to the client from the server then you will still need to keep a connection open. This isn’t necessarily a problem if you use Java NIO you should be able to handle tens of thousands of simultaneous incoming connections relatively easily.

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

Sidebar

Related Questions

I have an Java applications which I would like to run with different values
Does anyone know of any publicly available Question answering applications which have built using
I have a few separate applications which are all launched purely through a main
I have a WCF service, and two WPF applications which acts as clients for
I have node.js server which acts like a proxy. It receives requests and forwards
I have a barcode scanner (which acts like a keyboard) and of course I
I have a requirement to design a Web Application which acts as a Facade
I am new to Wpf programming. I have seen applications which have a link
Many applications have dialogs which have totally custom-looking dialogs, big fat tool-bars and non-rectangular
I have multiple web applications (PHP) which are being served to different customers from

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.