Is select function internaly call tcp connect ?
Posted
by
Syedsma
on Stack Overflow
See other posts from Stack Overflow
or by Syedsma
Published on 2011-01-17T11:44:13Z
Indexed on
2011/01/17
11:53 UTC
Read the original article
Hit count: 154
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?
© Stack Overflow or respective owner