Winsock Error Codes - Brought to you by Winsock-Error.com

10042 "Bad protocol option."

WSAENOPROTOOPT (Winsock error number: 10042)

Microsoft say this about Winsock error 10042 - WSAENOPROTOOPT:

An unknown, invalid or unsupported option or level was specified in a getsockopt or setsockopt call.

Full details of Winsock TCP error 10042 - WSAENOPROTOOPT:

Berkeley description: A bad option or level was specified in a(2) or setsockopt(2) call.

WinSock description: Same as Berkeley; the option is unknown or unsupported.

Detailed description:

SO_BROADCAST is not supported on sockets of type SOCK_STREAM.

SO_ACCEPTCONN, SO_DONTLINGER, SO_KEEPALIVE, SO_LINGER, SO_OOBINLINE and TCP_NODELAY are not supported on sockets of type SOCK_DGRAM.

SO_DEBUG, SO_DONTROUTE, SO_RCVBUF, SO_SNDBUF, TCP_NODELAY: optional socket options.

SO_ACCEPTCONN, SO_ERROR, SO_TYPE: are read-only options, so they work with, but not with

Developer suggestions: Check the parameters. Are you using an optional level or socket option that may not be supported on all WinSock implementations? If so, treat this as a non-fatal error and ignore it, if possible.

   
This page is designed to help you to understand Winsock TCP error 10042. It will not necessarily mean you can instantly fix issues when your computer tells you that Winsock is having problems with code 10042, rather it will give you the necessary background information to help solve the matter.

Programming declarations for 10042 (WSAENOPROTOOPT):

C#
long WSAENOPROTOOPT = 10042 ;

VB.net
Dim WSAENOPROTOOPT As Long = 10042

VB6
Dim WSAENOPROTOOPT As Long
WSAENOPROTOOPT = 10042