InetServerUnlock
BOOL InetServerUnlock(
SOCKET hServer  
);

The InetServerUnlock function unlock the specified server, allowing other server threads to resume execution.

Parameters

hServer
The socket handle to the server.

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 InetServerUnlock function releases the lock on the specified server and allows any blocked threads to resume execution. Only one server may be locked at any one time, and only the thread which established the lock can unlock the server.

Every time the InetServerLock function is called, an internal lock counter is incremented, and the lock will not be released until the lock count drops to zero. This means that each call to InetServerLock must be matched by an equal number of calls to the InetServerUnlock function. Failure to do so will result in the server becoming non-responsive as it remains in a locked state.

The program should always check the return value from this function, and should never assume that the lock has been released. If a potential deadlock situation is detected, this function will fail and return a value of zero.

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

InetGetLockedServer, InetGetServerStatus, InetServerLock


Copyright © 2008 Catalyst Development Corporation. All rights reserved.