cossy74
asked on
Winsock and Connection Failures
Hi,
i am trying to get a winsock to retry a connection attemp if it failed the first time.
How can i do this?
//----------------- MY CONNECTION CODE -------------------------- --------
if (::connect(s_, (sockaddr *) &addr, sizeof(sockaddr)))
{
error = strerror(WSAGetLastError() );
throw error;
}
i am trying to get a winsock to retry a connection attemp if it failed the first time.
How can i do this?
//----------------- MY CONNECTION CODE --------------------------
if (::connect(s_, (sockaddr *) &addr, sizeof(sockaddr)))
{
error = strerror(WSAGetLastError()
throw error;
}
Have you initialized Winsock? You have to make a call to WSAStartup() before you can use any of the Winsock functions.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.