I ported my code from linux to windows. I get weird error about 10014 refering to accept() error...The error lies around the code below.
Choose a port to listen on: 32324
waiting for a connection ...
&clientInfo_size address of to the exact size of sockaddr. It works in Linux! In Win, doesn't. Why? What should i do?
Note: i have to pass the size by ref.
struct sockaddr clientInfo; //obtains clients information once accept() succeed
int clientInfo_size; //holds the size of cleintInfo
//get the size of sockaddr struct of clientAddr
clientInfo_size = sizeof clientInfo;
//accept pending connection. Information of incoming connection will go to clientInfo
clientSockD = accept(serverSockD, &clientInfo, &clientInfo_size);
if(clientSockD == INVALID_SOCKET )