|
while(!Terminated && ClientSocket->Connected) {
try {
pStream = new TWinSocketStream(ClientSocket, 60000);
try {
memset(Buffer, 0, BUFFER_SIZE); // initialize the buffer
// give the client 60 seconds to start writing
if(pStream->WaitForData(60000)) {
if(pStream->Read(Buffer, BUFFER_SIZE) == 0) { // <-- 이부분이 에러가 납니다
ClientSocket->Close(); // if can read in 60 seconds, close the connection
} // if
// now process the request
...
서버 소켓 프로그램을 만들고 stThreadBlocking 모드로
클라이언트 소켓 프로그램으로 내 컴퓨터 아이피로 접속하여 버튼을 누르면 데이터를 전송하는데
위 코드에서 <-- 이부분에서
..... Read error6, 핸들이 잘못되었습니다. ..... 란 에러가 자꾸 나오네요
위 부분에서 브레이크 포인트를 잡아놓고 f8로 순차 실행을 하면 이런 에러가 안나오는데
이거 무슨 문제 인가요?
|