1 / 10

Ioctlsocket

Ioctlsocket. 목차. Ioctlsocket 함수 소개 Ioctlsocket 에 적용가능한 I/O 명령 Ioctl 명령 - FIONBIO Ioctlsocket 적용예제 참고서적 및 사이트. Ioctlsocket 함수 소개. int ioctlsocket ( SOCKET s, long cmd , u_long FAR * argp );. 명령을 내릴 소켓. 실행한 I/O 명령들. 명령에 대한 변수 포인터. Ioctlsocket 함수 소개. Return Values

Download Presentation

Ioctlsocket

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. Ioctlsocket

  2. 목차 • Ioctlsocket함수 소개 • Ioctlsocket에 적용가능한 I/O명령 • Ioctl명령 -FIONBIO • Ioctlsocket적용예제 • 참고서적 및 사이트

  3. Ioctlsocket함수 소개 • intioctlsocket( SOCKET s, long cmd,u_long FAR *argp); 명령을 내릴 소켓 실행한 I/O 명령들 명령에 대한 변수 포인터

  4. Ioctlsocket함수 소개 • Return Values • 성공적으로 함수가 수행하면, ioctlsocket 함수는 0을 반환 합니다. 에러가 발생한 경우는 SOCK_ERROR을 반환하고, WSAGetLastError 함수를 이용해서 특정한 에러코드를 얻을 수 있습니다. • Error Codes • WSANOTINITIALISED 이 함수를 사용하기 전에 성공적인 WSAStartup함수의 호출이 없었습니다. • WSAENETDOWN 네트웍 서브 시스템에 에러가 발생했습니다. • WSAEINPROGRESS 블럭킹윈속v1.1 이 현재 진행 중이거나, 서비스 프로바이더가콜백 함수를 여전히 처리하고 있습니다. • WSAENOTSOCK 기술자(descriptor)가 소켓 기술자가 아닙니다. • WSAEFAULT argp매개변수가 올바를 형태가 아닙니다

  5. Ioctlsocket에 적용가능한 I/O명령

  6. Ioctl명령 -FIONBIO • 소켓을 생성하면 기본으로 BLOCK모드로 만들어진다. • blocking 모드일 때 connect, recv, send 호출할 때 연결하려고 하는 server 가 작동하지 않을시 일정시간동안 기다리는 것이다. • non-blocking 모드일 때는 위와 같은 상황에서 일정한 시간을 기다려도 응답이 없을 때 예외가 발생한다. • 다음은 connect함수에 대한 예이다.

  7. Ioctlsocket - FIONBIO

  8. Ioctlsocket - FIONBIO

  9. 참고서적 및 사이트 • NETWORK PROGRAMMING FOR MICROSOFT WINDOWS - 정보문화사 • 윈도우 네트워크 프로그래밍 - 한빛미디어 • www.codeproject.com

  10. 감사합니다.

More Related