InetServerSuspend
BOOL 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 Vista, Windows XP or Windows 2000 Professional.
Server: Requires Windows Server 2008, Windows Server 2003 or Windows 2000 Server.
Header: Include cswsock6.h.
Library: Use cswskav6.lib.

See Also

InetGetServerStatus, InetServerRestart, InetServerResume, InetServerStart, InetServerStop, InetServerThrottle


Copyright © 2008 Catalyst Development Corporation. All rights reserved.