| Previous | Next |
| EPROTONOSUPPORT | ETIMEDOUT |
EPROTOTYPE
EPROTOTYPE identifies an incompatible protocol-and-socket-type pair. A protocol can exist on the machine and an address family can be supported, while the selected combination still makes no sense: for example, a message-oriented protocol where a stream endpoint was requested, or a stream protocol where a datagram endpoint was requested.
Native Windows socket code normally reports WSAEPROTOTYPE via WSAGetLastError(). The POSIX-style constant is useful for cross-platform code, but the diagnostic must retain the original socket arguments and any provider chosen by the implementation.
Separate three different errors
EAFNOSUPPORTconcerns the address family.EPROTONOSUPPORTconcerns whether the protocol is available.EPROTOTYPEconcerns whether that available protocol fits the requested socket type.- Log all three creation parameters before deciding which layer needs correction.
References
Looking for a different code? Search another status or error code.