| BOOL WINAPI InetServerSuspend(
|
| |
SOCKET hServer |
|
| );
|
The InetServerSuspend function temporarily suspends
accepting client connections on the specified server.
Parameters
- hServer
- Handle to the server socket.
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 InetGetLastError.
Remarks
The InetServerSuspend function instructs the server to
suspend accepting new client connections. Any incoming client
connections will be queued up to the maximum backlog value
specified when the server was started. To resume accepting client
connections, call the InetServerResume function.
It is recommended that you only suspend a server if absolutely
necessary, and only for brief periods of time. If you want to limit
the number of active client connections or control the connection
rate for clients, use the InetServerThrottle function.
The socket handle for the server must be one that was created by
calling the InetServerStart function, and cannot be a socket
that was created using the InetListen or InetListenEx
functions.
Requirements
Client: Requires Windows 7, Windows Vista or Windows
XP.
Server: Requires Windows Server 2008 or Windows Server
2003.
Header: Include cswsock7.h.
Library: Use cswskav7.lib.
See Also
InetGetServerStatus,
InetServerRestart, InetServerResume, InetServerStart, InetServerStop, InetServerThrottle
|