Communicating between 2 seperate sockets

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..
 
S

santosh

caroalv said:
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.
<snip>

This question is way off-topic for this group, which deals with
standard C. Try comp.unix.programmer, comp.programming, comp.os.ms-
windows.programmer.win32, comp.os.linux.development.apps or a group
specific to your platform.
 
K

Kenny McCormack

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.

Off topic. Not portable. Cant discuss it here. Blah, blah, blah.

Useful clc-related links:

http://en.wikipedia.org/wiki/Aspergers
http://en.wikipedia.org/wiki/Clique
http://en.wikipedia.org/wiki/C_programming_language
 
C

Christopher Benson-Manica

Christopher Layne said:
Kenny McCormack wrote:
Haha. Too funny.

You're entitled to your opinion, but you're not doing anyone any
favors by satisfying Mr. McCormack's desire for attention. Please do
not feed the troll.
 
K

Kenny McCormack

You're entitled to your opinion, but you're not doing anyone any
favors by satisfying Mr. McCormack's desire for attention. Please do
not feed the troll.

It is probably safe to say that he is doing both himself and me a favor
by posting. That's 2 people that must count for something.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top