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
Post a Comment