Freigeben über


WSPSendDisconnect (Windows CE 5.0)

Send Feedback

This function initiates termination of the connection for the socket and sends disconnect data.

Note   WSPSendDisconnect is not supported for the default TCP/UDP provider in Windows CE. However, third parties can implement their own provider and have support for this function if they choose.

int WSPSendDisconnect(SOCKET s,LPWSABUF lpOutboundDisconnectData,LPINT lpErrno);

Parameters

  • s
    [in] A descriptor identifying a socket.
  • lpOutboundDisconnectData
    [in] A pointer to the outgoing disconnect data.
  • lpErrno
    [out] A pointer to the error code.

Return Values

This function always returns SOCKET_ERROR and sets lpErrno to WSASYSCALLFAILURE on Windows CE.

Remarks

This function is used on connection-oriented sockets to disable transmission, and to initiate termination of the connection along with the transmission of disconnect data, if any.

After this function has been successfully issued, subsequent sends are disallowed.

lpOutboundDisconnectData, if not NULL, points to a buffer containing the outgoing disconnect data to be sent to the remote party.

Note   WSPSendDisconnect does not close the socket, and that resources attached to the socket will not be freed until WSPCloseSocket is invoked.

WSPSendDisconnect does not block regardless of the SO_LINGER setting on the socket.

WSPConnect

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Ws2spi.h.
Link Library: Ws2.lib.

See Also

WSPConnect | WSPSocket

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.