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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:49:59+00:00 2026-05-24T23:49:59+00:00

This could probably be the strangest question every asked here. I’ll try to explain

  • 0

This could probably be the strangest question every asked here. I’ll try to explain it the best I can.

I need to rapidly develop a network application in Java, integrating a bunch of old network applications (I already have the code for them) and making everything work together. Each old application will become a sub-function of the new one; the new one is fundamentally a “wrapper”.

Obviously, each of these applications (which have been developed by different people in different times) work in different way, with different protocols, with radically different syntax for the messages (i.e. some protocols use binary messages, some other use HTTP like messages, some other use XML) and different message order strategies (pipelining, stop and wait, etc…).

Fortunately, they are all TCP.

The wrapper application should work opening something like 6-7 different sockets at different ports, and this is not good for our network administrators. They only want one socket on one port. So all the protocols have to crush on the same pipe.

Is there any pure Java, out-of-the-box solution to multiplex and demultiplex many independent full-duplex streams on the very same TCP socket, in a transparent and hassle-free manner?

Or is there a simpler solution I’m forgetting about?

EDIT: the sub-streams are independent, i.e. there’s no deadlock possibility caused by one sub-stream waiting for some stuff coming from another.

  • 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-24T23:50:00+00:00Added an answer on May 24, 2026 at 11:50 pm

    You can’t do it in a transparent manner over TCP.

    Consider for example what will happen if your application sends a request over one of the “channels” that depends on data it needs to get on another “channel”. If a network conditions drops enough packets of one of the “channels” to cause your TCP connection to stall (due to TCP window) waiting for response you would in effect be stalling all the other “channels” in the same TCP connection since they share the same window and you can get into a deadlock

    This would not have happen before with each channel in the same window.

    This may or may not affect your specific application – but it might, so this technique is not transparent. You can try using SCTP to overcome this, if possible

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

Sidebar

Related Questions

This is probably a kinda commonly asked question but I could do with help
This could probably also be asked as Is kCTKernAttributeName a misnomer? I need to
This could quite possibly be the dumbest question ever asked. Our client wants us
I'm using IntelliJ IDEA 8 for debugging some Java, but this question could probably
I could probably write this myself, but the specific way I'm trying to accomplish
I could probably find this out from somewhere else but thought it would be
Probably really easy for a pro, but could someone re-write this from it's PHP
This is probably a really simple jQuery question, but I couldn't answer it after
This could be a little off the ballpark, but a friend asked me about
This could be considered a duplicate question, as a similar one has already been

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.