Is select function internaly call tcp connect ?
- by Syedsma
Code Sinnpet:
int CreateaTCPSocket()
{
int iSockID = ACE_OS::socket(......);
ACE_OS::set_flags(iSockID,O_NONBLOCK);
ACE_OS::bind();
if (ACE_OS::connect(iSockID ,....) < 0)
{
if (ACE_OS::select(.....,timeout) <= 0)
{
return INVALID_HANDLE;
}
}
return iSockID;
}
My question is when connect is failed for non-block error and select is called and say select return success then again we need to call connect or select function internal do connect?