What does errno 107 (ENOTCONN) mean?

 
Could be also:
ConstantTypeOS
ERROR_DISK_CHANGEWin32 errorWindows
ECONNREFUSEDerrnoWindows
PROCESS1_INITIALIZATION_FAILEDBugCheck CodeWindows
Previous Next
EISCONN ESHUTDOWN

ENOTCONN

ENOTCONN means the current socket has no established peer relationship required by the operation. A stream socket may never have completed connect(), may have been accepted incorrectly, or may already have been closed or shut down. For datagram sockets, it often means the program used a send-style call without a default peer and without supplying a destination.

The correct recovery depends on the socket type and call. A stream client normally creates a new socket and establishes a new connection; continuing on the same failed connection object is unsafe. A datagram client can either use sendto() with an address for each datagram or set a default peer with connect(). That datagram connect() is local socket configuration, not a TCP-style session handshake.

Do not confuse it with

  • EDESTADDRREQ: a datagram send has no destination address.
  • EISCONN: code is trying to connect or provide a destination when the socket is already connected.
  • EPIPE: a connection-oriented write hit a closed or shut-down path; Linux can report it in situations where another system might use ENOTCONN.

Linux recv(2) · Linux send(2) · GNU C Library error codes


Looking for a different code? Search another status or error code.