C
caroalv
Hiya,
I hope I'm using the correct group here. I'm a newbie to C.
I need a Java program and external program to send and receive
messages to and from each other, but the only way I can do it is
through a C program (and it has to be C due to the external
hardware). As a result, I am writing a C program that will create a
client socket to the Java program and a server socket to an external
program.
So, I need the program to:
Set up a client socket to the Java program
Set up as a server
Accept a client connection from the external program
Listen for messages from the Java server on the client socket
Send those to the external program on the server socket
Listen for messages from the external program on the server
socket
Send those to the Java program on the client socket
As a result each socket needs to listen to messages from both the
other socket and the application it's attached to.
I am completely stuck on this so any help would be appreciated..
I hope I'm using the correct group here. I'm a newbie to C.
I need a Java program and external program to send and receive
messages to and from each other, but the only way I can do it is
through a C program (and it has to be C due to the external
hardware). As a result, I am writing a C program that will create a
client socket to the Java program and a server socket to an external
program.
So, I need the program to:
Set up a client socket to the Java program
Set up as a server
Accept a client connection from the external program
Listen for messages from the Java server on the client socket
Send those to the external program on the server socket
Listen for messages from the external program on the server
socket
Send those to the Java program on the client socket
As a result each socket needs to listen to messages from both the
other socket and the application it's attached to.
I am completely stuck on this so any help would be appreciated..