InetServerRestart
SOCKET InetServerRestart(
SOCKET hServer  
);

The InetServerRestart function restarts the server, terminating all active client sessions.

Parameters

hServer
Handle to the server socket.

Return Value

If the function succeeds, the return value is the new socket handle for the specified server. If the function fails, the return value is INVALID_SOCKET. To get extended error information, call InetGetLastError.

Remarks

The InetServerRestart function will restart the specified server, terminating all active client sessions and recreating the listening socket. The socket handle that is returned by the function is the handle for the new listening socket, and the old handle value is no longer valid. If the function is unable to recreate the listening socket for any reason, the server thread is terminated.

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, InetServerResume, InetServerStart, InetServerStop, InetServerSuspend


Copyright © 2008 Catalyst Development Corporation. All rights reserved.