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