Wednesday, January 8, 2014

For blocking socket programming, except there is no way to end its timeout blocking

As stated, xcode in the underlying protocol is called c + +, socket network connection way through the function

setsockopt (m_ulSocket, SOL_SOCKET, SO_SNDTIMEO, (const void *) & iSendTime, sizeof (int)) Set the timeout timeout but the return value is -1 has not investigated the reasons

There is no other way to stop after a certain time in over a socket connection?
Reply:
With select himself wrote it

No comments:

Post a Comment