Berkeley description: A protocol was specified that does
not support the semantics of the socket type requested. For example, you
cannot use the ARPA Internet UDP protocol with type SOCK_STREAM.
WinSock description: Same as Berkeley. This error occurs
if you specifically reference a protocol that isn't part of the address
family you also reference. The only function that takes these two
explicit parameters is.
Developer suggestions: Since there're only one
corresponding protocol for each of the datagram and datastream socket
types in the Internet address family, you should simply leave the value
in the protocol input parameter to.
Alternately, you could call
to get the appropriate protocol value from the network system.