kmachstang
November 23rd, 2007, 05:26 PM
Hello,
I think I am misunderstanding something which is leading to some confusion.
I am using fork to have a concurrent TCP listening server on a linux machine.
The Client program uses select() for I/O multiplexing.
When the clients connect, i have a shared memory segment where on connection i save the return value of the accept function ( I assumed this was the connection id ).
I then have a function that allows one client to send a message to another client where i use the send function. Currently, the message is just echo'd back to the client that sends the message.
I don't think I am understanding this right, could someone explain how I might relay a message from one client to another, through the server, over TCP???
Thanks,
Kyle
I think I am misunderstanding something which is leading to some confusion.
I am using fork to have a concurrent TCP listening server on a linux machine.
The Client program uses select() for I/O multiplexing.
When the clients connect, i have a shared memory segment where on connection i save the return value of the accept function ( I assumed this was the connection id ).
I then have a function that allows one client to send a message to another client where i use the send function. Currently, the message is just echo'd back to the client that sends the message.
I don't think I am understanding this right, could someone explain how I might relay a message from one client to another, through the server, over TCP???
Thanks,
Kyle