[ back to toc ]

Maybe whith select()?

Date: 2002/03/09 01:01

Q:
How to write a server in c under Unix, hwo read from an array of char and
write in another one at the same time, using only one socket(TCP). Without
using (like i did) a non-blocking socket that is always readed then
writed. Maybe with select()? but how?
A:
Yes select is the function to use. Select can be used to wait for a
certain time or infintely until there is one or are more sockets readable,
writable.

Please read the manual page of select.

I also recommend to read

Beej's Guide to Network Programming

Regards,
Peter

[ back to toc ]