Browse Source

disable timeout

release/v0.1
jl777 8 years ago
parent
commit
00a312abbe
  1. 8
      iguana/iguana_peers.c

8
iguana/iguana_peers.c

@ -437,11 +437,11 @@ int32_t iguana_socket(int32_t bindflag,char *hostname,uint16_t port)
}
}
timeout.tv_sec = 0;
timeout.tv_usec = 30000;
setsockopt(sock,SOL_SOCKET,SO_RCVTIMEO,(void *)&timeout,sizeof(timeout));
timeout.tv_usec = 1000000;
//setsockopt(sock,SOL_SOCKET,SO_RCVTIMEO,(void *)&timeout,sizeof(timeout));
timeout.tv_sec = 0;
timeout.tv_usec = 10000;
setsockopt(sock,SOL_SOCKET,SO_SNDTIMEO,(void *)&timeout,sizeof(timeout));
timeout.tv_usec = 1000000;
//setsockopt(sock,SOL_SOCKET,SO_SNDTIMEO,(void *)&timeout,sizeof(timeout));
if ( listen(sock,64) != 0 )
{
printf("listen(%s) port.%d failed: %s sock.%d. errno.%d\n",hostname,port,strerror(errno),sock,errno);

Loading…
Cancel
Save