1 / 9

비트 18 기 최용호

1. 2. 소켓 연결 종료의 문제점. 우아한 종료. 예 제. 4. 3. Half-Close. 우아한 종료. WSP 과정. 비트 18 기 최용호. 1. 소켓 연결 종료의 문제점. Stream. MSG. MSG. 우아한 종료. 2. 문제 해결 방법 : 소켓 스트림의. 일부만 종료. 전송은 가능하지만 수신은 불가능 , 혹은 수신은 가능하지만 전송은 불가능. Half-Close. Half-Close. 3. Stream. MSG. MSG. Half-Close. 3.

kadeem-head
Télécharger la présentation

비트 18 기 최용호

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 1 2 소켓 연결 종료의 문제점 우아한 종료 예 제 4 3 Half-Close 우아한 종료 WSP 과정 비트 18기 최용호

  2. 1 소켓 연결 종료의 문제점 Stream MSG MSG

  3. 우아한 종료 2 문제 해결 방법 : 소켓 스트림의 일부만 종료 전송은 가능하지만 수신은 불가능, 혹은 수신은 가능하지만 전송은 불가능 Half-Close

  4. Half-Close 3 Stream MSG MSG

  5. Half-Close 3 s : half-close를 할 소켓의 핸들 how : 종료 모드를 인자로 전달한다. #include <winsock2.h> Int shutdown(SOCKET s, int how);

  6. Half-Close 3

  7. 4 예 제 Client Server 연결요청 파일전송 EOF 전송 thank you

  8. 주의해야할 사항 파일을 전송할 경우… 송신쪽에서는 파일의 끝을 알지만 수신쪽에서는 파일의 끝을 알 수 없다. 계속해서 데이터함수를 호출하는 경우 블로킹상태에 빠질 수 있다. 해결방법 : 송신쪽에서 파일 전송이 끝나는 경우 EOF메시지를 전송해준다.

  9. 감사합니다

More Related