|
|
@ -94,7 +94,7 @@ Handleset_waitReady(HandleSet self, unsigned int timeoutMs)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int result;
|
|
|
|
int result;
|
|
|
|
|
|
|
|
|
|
|
|
if (self != NULL && self->maxHandle >= 0) {
|
|
|
|
if ((self != NULL) && (self->maxHandle >= 0)) {
|
|
|
|
struct timeval timeout;
|
|
|
|
struct timeval timeout;
|
|
|
|
|
|
|
|
|
|
|
|
timeout.tv_sec = timeoutMs / 1000;
|
|
|
|
timeout.tv_sec = timeoutMs / 1000;
|
|
|
@ -350,13 +350,9 @@ Socket_connectAsync(Socket self, const char* address, int port)
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!prepareServerAddress(address, port, &serverAddress))
|
|
|
|
if (!prepareServerAddress(address, port, &serverAddress))
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
self->fd = socket(AF_INET, SOCK_STREAM, 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setSocketNonBlocking(self);
|
|
|
|
setSocketNonBlocking(self);
|
|
|
|
|
|
|
|
|
|
|
|
if (connect(self->fd, (struct sockaddr *) &serverAddress, sizeof(serverAddress)) == SOCKET_ERROR) {
|
|
|
|
if (connect(self->fd, (struct sockaddr *) &serverAddress, sizeof(serverAddress)) == SOCKET_ERROR) {
|
|
|
|