프로그래밍/Etc

[Delphi]윈도우 소켓 에러 값

가라멜 2018. 4. 27. 11:42
반응형

이번 프로젝트 진행 중.. 소켓 에러가 자주 발생하여 소켓 에러 값을 찾던 중 

델마당에서 소켓 에러 값에 대해 설명해놓은 게시글이 있어서 참고삼아 블로그로 옮겨놓았다.


출처 : 델마당(https://www.delmadang.com/)

질문과 답변란 '시간한줌'님 글




윈도우 소켓 에러 값 설명 



WSAEINTR 10004 

블럭킹 윈속이 WSACancelBlockingCall 함수에서 취소되었습니다 



WSAEBADF 10009 

잘못된 기술자(소켓 핸들)이다 



WSAEACCES 10013 

브로드캐스트 어드레스를 위한 데이터그램 소켓의 접속시도가 setsockopt 함수로 SO_BROADCAST가 설정되어있지 않은 상태에서 실패 했습니다. 



WSAEFAULT 10014 

name 또는 namelen 매개변수가 올바른 형태가 아닙니다. 



WSAEINVAL 10022 

accept 하기 전에 listen 함수가 불려지지 않았습니다. 



WSAEMFILE 10024 

새로운 소켓에 할당하기 위한 소켓 기술자가 더 이상 남아있지 않습니다 



WSAEWOULDBLOCK 10035 

소켓 함수가 비블럭킹 모드로 동작중이다 



WSAEINPROGRESS 10036 

블록화 함수가 호출 되는 동안 부적절한 소켓 함수가 호출되었다 



WSAEALREADY 10037 

이미 완료된 비동기 명령에 대한 취소가 시도됨 



WSAENOTSOCK 10038 

지정한 기술자가 소켓 기술자가 아닙니다 



WSAEDESTADDRREQ 10039 

해당 함수에 목적지 어드레스가 필요하지만 제공되지 않았음 



WSAEMSGSIZE 10040 

수신된 메시지가 지정된 버퍼에 저장하기에 너무 커서 손실 되었습니다 



WSAEPROTOTYPE 10041 

지정된 프로토콜이 잘못되었거나 이 소켓에 대해서 잘못된 형식입니다 



WSAENOPROTOOPT 10042 

알 수 없는 옵션이거나, 지원지지 않는 옵션을 사용했습니다. 



WSAEPROTONOSUPPORT 10043 

지정된 프로토콜이 지원되지 않는 형식입니다 



WSAESOCKTNOSUPPORT 10044 

지정된 소켓 타입이 지정한 어드레스 체계에서 지원되지 않는 형식입니다 



WSAEOPNOTSUPP 10045 

socket이 연결지향형 서비스(SOCK_STREAM)형태가 아닙니다. ex) listen이 UDP socket에서 호출 



WSAEPFNOSUPPORT 10046 

지정된 프로토콜 체계가(PF_*) 지원되지 않습니다 



WSAEAFNOSUPPORT 10047 

지정된 어드레스 체계가(AF_*) 지원되지 않습니다 



WSAEADDRINUSE 10048 

지정한 어드레스(IP)가 이미 사용중이다 



WSAEADDRNOTAVAIL 10049 

지정된 어드레스는 로컬 머신에서 사용할 수가 없다 



WSAENETDOWN 10050 

네트웍 서브 시스템에 에러가 발생했습니다 



WSAENETUNREACH 10051 

원격 시스템까지 네트웍이 도달할 수 없습니다 



WSAENETRESET 10052 

연산이 진행되고 있는 도중 접속이 끊겨버렸습니다. 



WSAECONNABORTED 10053 

연결이 out-of-band나 다른 실패 때문에 끊어져 버렸습니다. 



WSAECONNRESET 10054 

원격 연결지에서 "hard"나 "abortive" 종료를 수행해서 리셋되었습니다. 



WSAENOBUFS 10055 

윈도우 소켓 시스템의 버퍼 공간이 모자라거나, 애플리케이션에 의해 API에게 제공된 공간이 너무 작아서 요청된 정보를 저장 할 수가 없음 



WSAEISCONN 10056 

지정된 소켓이 이미 연결 되어 있음 



WSAENOTCONN 10057 

지정된 소켓이 이미 연결 되어 있지 않음 



WSASHUTDOWN 10058 

소켓이 셧다운(shutdown()) 되었습니다. 



WSAETOOMANYREFS 10059 

지정한 함수에 대한 인자가 너무 많음 



WSAETIMEDOUT 10060 

접속 시도가 시간초과 되었습니다. 



WSAECONNREFUSED 10061 

접속시도가 강제로 종료되었습니다 



WSAELOOP 10062 





WSAENAMETOOLONG 10063 






WSAEHOSTDOWN 10064 

원격 호스트가 다운 되었음 



WSAHOSTUNREACH 10065 

네트웍 시스템 장애 등에 의해서 원격호스트까지도 달 할 수 없습니다. 



WSASYSNOTREADY 10091 

네트워크 서브 시스템이 아직 통신할 준비가 되어 있지 않음(WSAStartup()이 반환) 



WSAVERNOTSUPPORTED 10092 

요청한 윈도우즈 소켓 버전이 현재 윈도우즈 소켓 시스템에서 지원하지 않습니다. 



WSANOTINITIALISED 10093 

이 함수를 사용하기 전에 성공적인 WSAStartup 함수의 호출이 없었습니다. 



WSAHOST_NOT_FOUND 11001 

호스트를 찾아낼 수 없습니다. 



WSATRY_AGAIN 11002 

요청된 정보가 발견 되지 않음 



WSANO_RECOVERY 11003 

회복할 수 없는 에러발생 



WSANO_DATA 11004 

잘못된 이름(name)으로 아무런 데이터가 기록되지 않았습니다. 




------------- 추가로 영어 버전 --------------

Error Code Error Message

10004 The operation is canceled.
10013 The requested address is a broadcast address, but flag is not set.
10014 Invalid argument.
10022 Socket not bound, invalid address or listen is not invoked prior to
accept.
10024 No more file descriptors are available, accept queue is empty.
10035 Socket is non-blocking and the specified operation will block.
10036 A blocking Winsock operation is in progress.
10037 The operation is completed. No blocking operation is in progress.
10038 The descriptor is not a socket.
10039 Destination address is required.
10040 The datagram is too large to fit into the buffer and is truncated.
10041 The specified port is the wrong type for this socket.
10042 Option unknown, or unsupported.
10043 The specified port is not supported.
10044 Socket type not supported in this address family.
10045 Socket is not a type that supports connection oriented service.
10047 Address Family is not supported.

---> 10048 Address in use.

10049 Address is not available from the local machine.
10050 Network subsystem failed.
10051 The network cannot be reached from this host at this time.
10052 Connection has timed out when SO_KEEPALIVE is set.
10053 Connection is aborted due to timeout or other failure.
10054 The connection is reset by remote side.
10055 No buffer space is available.
10056 Socket is already connected.
10057 Socket is not connected.
10058 Socket has been shut down.
10060 The attempt to connect timed out.
10061 Connection is forcefully rejected.
10201 Socket already created for this object.
10202 Socket has not been created for this object.
11001 Authoritative answer: Host not found.
11002 Non-Authoritative answer: Host not found.
11003 Non-recoverable errors.
11004 Valid name, no data record of requested type.