Microsoft Windows CE 3.0  

shutdown

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This function disables send or receive operations on a socket. It does not release any system resources used by the socket.

int
shutdown
(
SOCKET
s
,
int
how
);

Parameters

s
[in] Descriptor that identifies a socket.
how
[in] Flag that describes what types of operation will no longer be allowed.

Return Values

Zero indicates that no error occurred. SOCKET_ERROR indicates failure. To get a specific error value, call WSAGetLastError.

Remarks

The shutdownfunction is used on all types of sockets to disable reception, transmission, or both.

The shutdownfunction does not close the socket. Any resources attached to the socket will notbe freed until closesocketis invoked.

Note   The shutdownfunction does not block regardless of the SO_LINGER setting on the socket.

An application should not rely on being able to re-use a socket after it has been shut down. In particular, a Windows Sockets provider is not required to support the use of connecton a socket that has been shutdown.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later Winsock.h    
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

closesocket, connect, socket, WSAStartup