1. Check the code and ask question

Launch the installation of siege with homebrew homebrew 를 이용해서 siege 설치를 시작하세요.

Ask to get an explanation of how select is working.

select가 어떻게 동작하는지 설명해보세요.

select 함수가 필요한 이유 select 를 이용하지 않을 경우, 서버가 클라이언트의 요청을 어떻게 처리해야하는지 select 함수의 각각의 인자. fd_set 구조체란. select 함수가 fd를 감시하고 변화를 감지하는 원리.

Ask if there is only one select and how they've managed the server accept and the client read/write.

코드 내에 select가 하나만 있는지 확인하고, 서버가 클라이언트의 read/write 를 받아들이는 것을 select 가 어떻게 관리하는지 설명해보세요.

select 함수로 fd_set 을 감시하고, main loop 내에 FD_ISSET 으로 해당 fd 에 읽거나 쓸 내용이 있는지 확인한다. select 에서 이를 감지하면 해당 fd 말고 나머지를 전부 0으로 바꾼다.

The select should be in the main loop and should check fd for read and write AT THE SAME TIME, if not please give a 0 and stop the evalaution.

select 는 main 함수의 루프 안에 있어야 하고 fd들에 대해 read와 write를 동시에 체크(감시)해야 합니다.

There should be only one read or one write per client per select. ASK to show you the code that goes from the select th the read and write of a client.

select 하나 당 read 또는 write 하나, client 하나 당 read 또는 write 하나여야 함. select 에서부터 클라이언트의 read 또는 write에 이르는 과정을 설명해보세요. Search for all read/recv/write/send on a socket and check that if an error returned the client is removed.

소켓에서 모든 read/recv/write/send를 검색하고 오류가 반환될시 클라이언트가 제거되는지 확인

모든 read 나 write 에 대해, 에러 발생시(반환값 음수면) 처리 Search for all read/recv/write/send and check if the returned value is well checked.(checking only -1 or 0 is not good you should check both)

소켓에서 모든 read/recv/write/send를 검색하고 반환값이 잘 체크되고 있는지 확인. ( -1 이 반환 되는 경우 0 이 반환되는 경우 모두 체크)

위에 문항이랑 같은 얘기 If a check of errno is done after read/recv/write/send. Please stop the evaluation and put a mark 0.

errorno 체크가 read/recv/write/send 이후에 이루어진다면, 평가는 멈추고 0점으로 처리.

현재는 파일 열때만 체크 Writing or reading ANY file descriptor without going through the select is strictly FORBIDDEN.