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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:22:49+00:00 2026-05-27T21:22:49+00:00

I am to write a cross platform program for windows and linux :: A

  • 0

I am to write a cross platform program for windows and linux ::
A Java program will send data to a tcp/ip port and there will be a C/C++ program which will continuously listen from that tcp/ip port when it gets some data it will do some works and send the result data to another tcp/ip port from which now the Java program will read the data and do some actions.
I am more worried about the C/C++ portion. Can you please help with any detail or useful link or sample code ?

  • 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-27T21:22:49+00:00Added an answer on May 27, 2026 at 9:22 pm

    There are tons of networking APIs/libraries and event notifications mechanisms. Since I assume you are new to C++ and don’t really want to deal with platform-specific functionality in order to squeeze microseconds from your implementation and/or write different code for different platforms, I think your best bet is to use Boost ASIO – a cross-platform C++ library for network and low-level I/O programming. It has a very good documentation, tons of examples, and is pretty easy to use in general. It will work on many platforms w/o a need to change a single line of code in your application. It has its pitfalls, but they are not very significant unless you are doing something extremely complicated that has a lot of strict requirements for performance, memory usage, latency, throughput or all of the above.

    Just in case I am not right in my assumptions, there are a lot of alternatives. Some of them are:

    • libevent – a mechanism to execute a callback function when a specific event occurs on a file descriptor or after a timeout has been reached
    • epoll – a scalable I/O event notification mechanism for Linux
    • kqueue – a scalable event notification interface introduced in FreeBSD 4.11, also supported in NetBSD, OpenBSD, DragonflyBSD, and Mac OS X.
    • POSIX
    • Windows API (those guys always re-invent the wheel).

    Good luck!

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

Sidebar

Related Questions

I need to write cross platform application (basically CRUD). Is usage of Java Swing
I am trying to write a cross-platform python program that would run in the
I'm writing a Java application which requires a number of resource files (there will
I'd like to port a Linux C program to Java. This program controls a
How could I write a program which runs on both Windows 7, Mac OS
I have the requirements to write a cross platform (win/linux) desktop applications. What database
I've been asked to write a cross-platform desktop app in Java. Targeted platforms are
I need to write cross-platform GUI application, what toolkit can I use? Currently I
I would like to write a cross-platform function in C++ that contains system calls.
I am attempting to write a cross-platform GUI application that would be deployed to

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.