iphone - BSD sockets and timeouts in iOS -



iphone - BSD sockets and timeouts in iOS -

i setup socket alternative this:

struct timeval tv; tv.tv_sec = 0; tv.tv_usec = 0; if (setsockopt(sockfd, sol_socket, so_rcvtimeo, &tv, sizeof(tv)) == -1) { perror("setsockopt"); exit(1); }

when socket blocks forever on recv phone call when set tv_usec 1 socket timesout expected. expected behavior? help in understanding appreciated.

from official posix.1 manual page:

the default alternative value zero, indicates receive operation not time out.

so if set timeout 0 same default no timeout.

iphone ios ipad sockets unix

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -