|
혀비.오기 님이 쓰신 글 :
: 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
TWinSocketStream 객체 생성 부분이 while loop 내부에 있어야 하는것이 맞나요?
loop 안의 코드가 어떻게 진행될지 모르지만, 일단 pStream에 계속 새로운 객체가 생성되어 발생하는 문제같습니다.
|