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.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.