Hello DaniWeb!
How can I check the state of a socket to see if it's connected or not?
SOCKET sock = socket(AF_INET, SOCK_STREAM, 0);
SOCKET client;
//I know that this isn't binded to an address but nevermind that.
client = accept(sock,NULL,NULL);
if (client == HERE - Need to see if it's connected)
{
cout << "Connection established. \n";
}