OnIdle Event  
 

The OnIdle event is generated after the last client has disconnected from the server.

Syntax

Sub object_OnIdle ( [Index As Integer ] )

Remarks

This event will only occur after at least one client has connected to the server and then closes its connection or is disconnected. This event will not occur immediately after the server has started using the Start method, and will not occur when the server is stopped using the Stop method. Your application should implement an OnStart event handler for when the server first starts, and an OnStop event handler for when the server is stopped.

If one or more new client connections are accepted after this event occurs, the event will be generated again when those clients disconnect and the active client count drops to zero. Therefore it is to be expected that this event will occur multiple times over the lifetime of the server as it continues to listen for connections.

See Also

IsActive Property, Restart Method, Start Method, Stop Method, OnStop Event