Server::send503()
사용하지 않는 write() 리턴값 삭제
ret = write(fd, str.c_str(), str.size()); // 접속하려는 클라이언트에 503 에러 출력
if (ret >= -1) // write의 반환값은 항상 -1 인데 이걸 왜해놓은걸까?
{
close(fd);
FD_CLR(fd, _wSet);
_tmp_clients.pop(); // 대기중인 맨앞 클라이언트 제거
}
write(fd, str.c_str(), str.size()); // 접속하려는 클라이언트에 503 에러 출력
close(fd);
FD_CLR(fd, _wSet);
_tmp_clients.pop(); // 대기중인 맨앞 클라이언트 제거
Server class의 public variable 중 _tmp_client 를 _503_clients 로 수정
💡main.cpp 수정해야함.
Server::refuseConnection()
_503_CLIENTS_SIZE 라는 매크로 상수로 정의함