Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionif( listen(MainSock,1 )==SOCKET_ERROR )
virtual BOOL Accept( CAsyncSocket& rConnectedSocket, SOCKADDR* lpSockAddr NULL, int* lpSockAddrLen NULL ); Call this member function to accept a connection on a socket. This routine extracts the first connection in the queue of pending connections, creates a new socket with the same properties as this socket, and attaches it to rConnectedSocket. If no pending connections are present on the queue, Accept returns zero and GetLastError returns an error. The accepted socket (rConnectedSocket) cannot be used to accept more connections. The original socket remains open and listening.