this->Close();
this->state = I_ERROR;
this->OnError(I_ERR_RESOLVE);
+ this->fd = -1;
return false;
}
return this->DoConnect();
log(DEBUG,"Cant socket()");
this->state = I_ERROR;
this->OnError(I_ERR_SOCKET);
+ this->fd = -1;
return false;
}
this->OnError(I_ERR_CONNECT);
this->state = I_ERROR;
this->Close();
+ this->fd = -1;
return false;
}
}
log(DEBUG,"Write error on socket: %s",strerror(errno));
this->OnError(I_ERR_WRITE);
this->state = I_ERROR;
+ this->fd = -1;
return true;
}
}
this->OnError(I_ERR_TIMEOUT);
timeout = true;
this->state = I_ERROR;
+ this->fd = -1;
return true;
}
return this->FlushWriteBuffer();
int incoming = -1;
bool n = true;
+ if ((fd < 0) || (fd > MAX_DESCRIPTORS))
+ return false;
+
switch (this->state)
{
case I_RESOLVING: