Is select() Ok to implemnet single socket read/write timeout ?
Posted
by chmike
on Stack Overflow
See other posts from Stack Overflow
or by chmike
Published on 2010-03-15T08:40:52Z
Indexed on
2010/03/15
8:49 UTC
Read the original article
Hit count: 186
I have an application processing network communication with blocking calls. Each thread manages a single connection. I've added a timeout on the read and write operation by using select prior to read or write on the socket.
Select is known to be inefficient when dealing with large number of sockets. But is it ok, in term of performance to use it with a single socket or are there more efficient methods to add timeout support on single sockets calls ? The benefit of select is to be portable.
© Stack Overflow or respective owner