|
@ -311,10 +311,10 @@ int32_t iguana_socket(int32_t bindflag,char *hostname,uint16_t port) |
|
|
printf("socket() failed: %s errno.%d", strerror(errno),errno); |
|
|
printf("socket() failed: %s errno.%d", strerror(errno),errno); |
|
|
return(-1); |
|
|
return(-1); |
|
|
} |
|
|
} |
|
|
if ( 0 && bindflag != 0 ) |
|
|
if ( 1 && bindflag != 0 ) |
|
|
{ |
|
|
{ |
|
|
timeout.tv_sec = 0; |
|
|
timeout.tv_sec = 0; |
|
|
timeout.tv_usec = 10000; |
|
|
timeout.tv_usec = 1000; |
|
|
setsockopt(sock,SOL_SOCKET,SO_RCVTIMEO,(char *)&timeout,sizeof(timeout)); |
|
|
setsockopt(sock,SOL_SOCKET,SO_RCVTIMEO,(char *)&timeout,sizeof(timeout)); |
|
|
} |
|
|
} |
|
|
opt = 1; |
|
|
opt = 1; |
|
|