1.1.24.14 shutdown

C

int shutdown(int fd, int how)

Description

Shut down part of a full-duplex connection.

Parameters

ParametersDescription
fdSocket file descriptor.
howShutdown flags, must be SHUT_RDWR.

Returns

  • 0 - Success.

  • -1 - Error, errno set.

Remarks

errnoDescription
EBADFfd is not a valid file descriptor.
ENOTSOCKThe file descriptor fd does not refer to a socket.
ENOMEMInsufficient memory is available. The socket cannot be created until sufficient resources are freed.
EBADMSGBad message.