0

Hello all,

how can I pass some input from Java ti C++ using sockets.
The input is only two int numbers.

Any help with the sockets, please. I'm new but I need them.

2
Contributors
1
Reply
3
Views
7 Years
Discussion Span
Last Post by VernonDozier
0

Hello all,

how can I pass some input from Java ti C++ using sockets.
The input is only two int numbers.

Any help with the sockets, please. I'm new but I need them.

If you can pass info using sockets between two instances of a Java program and if you can pass info using sockets between two instances of a C++ program, then you can pass info between a Java and a C++ program. A socket is a socket. One side of the socket could not care less what language the other side was written in. As long as each side can handle the format for the data and are using the same protocol, it's all good.

For the C++ side, what OS are you using? If it's Linux, Beej is the man.

http://beej.us/guide/bgnet/

For Java, the OS shouldn't matter. For help on Java sockets, post in the Java forum. For the C++ side, post here.

Again, both sides are independent. You could write one side in Perl if you wanted and it could communicate just fine with the Java or C++ side.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.