I can't understand what I'm doing wrong, here is the server code and part of the client code.
Server:
Client:Code:SOCKET TempSocket = SOCKET_ERROR; // Set the TempSocket to error // while(TempSocket = SOCKET_ERROR) { TempSocket = accept(Socket, NULL, NULL); } Socket = TempSocket;
Code:if(connect(Socket, (SOCKADDR*)(&SockAddr), sizeof(SockAddr)) != 0) { SetConsoleTextAttribute(houtput, BACKGROUND_RED|BACKGROUND_INTENSITY); status = GetLastError(); cout << "" << endl; cout << "Failed to establish connection with the server" << endl; cout << "Application error code: " << status << endl; hinput = NULL; houtput = NULL; herror = NULL; Sleep(10000); return; }



LinkBack URL
About LinkBacks


