Reject a pending client connection.
Parameters
None.
Return Value
If the function succeeds, the return value is non-zero. If the
function fails, the return value is zero. To get extended error
information, call GetLastError.
Remarks
The Reject method rejects a pending client connection and
the remote host will see this as the connection being aborted. If
there are no pending client connections at the time, this method will
immediately return with an error indicating that the operation would
cause the server thread to block. This method should only be invoked
from within an OnAccept event handler if the application wishes
to reject the incoming connection before a client session is created.
To determine the IP address of a client that is attempting to
connect to the server from within the OnAccept event, use the
GetClientAddress method.
Requirements
Minimum Desktop Platform: Windows 7 (Service Pack 1)
Minimum Server Platform: Windows Server 2008 R2 (Service Pack 1)
Header: Include cswsock10.h
Import Library: cswskv10.lib
See Also
GetClientAddress,
OnAccept
|