helo friend.....!!!
i try to built an aplication. i got difficult how to break connection between client-server.
from that code i got error "socket() failed: 10057". as we know, that error message come from my shutdown().Code:void CComputer::OnButtonStart() { ... ... sServer = socket(PF_INET, SOCK_STREAM, IPPROTO_IP); ... ... } // my disconnect function void CComputer::OnButtonStop() { .... .... // try to shutdown if (shutdown(CComputer::sServer,2)==SOCKET_ERROR) { info.Format("socket() failed: %d", WSAGetLastError()); AfxMessageBox(info); return; } .... ..... }
how can i repair it???
thanks...




Reply With Quote