IsLocked Property  
 

Determine if the server has been locked using the SyncLock method.

This property has been deprecated and may not be included in future versions of the control.

Syntax

object.IsLocked

Remarks

The IsLocked property returns True if the server has been locked using the SyncLock method. When a server is locked, all background threads created by the server will block, waiting for the lock to be released. If this property returns a value of True, no client connections can be accepted by the server, and no network events will be generated.

The SyncLock method creates a critical section which prevents other threads from performing any network operation. This is useful when the program needs to update global data and wants to ensure that no network operations occur while the data is being modified. However, applications must take care to release the lock as quickly as possible. If a function locks the server, it must make sure that it releases the lock before exiting that function. Leaving the server locked across function calls or event handlers can result in the server becoming non-responsive.

Data Type

Boolean

See Also

SyncLock Method