SocketTools .NET Edition

InternetServer.OnTimeout Event

Occurs when a blocking operation fails to complete before the timeout period elapses.

[Visual Basic]
Public Event OnTimeout As OnTimeoutEventHandler
[C#]
public event OnTimeoutEventHandler OnTimeout;

Event Data

The event handler receives an argument of type InternetServer.TimeoutEventArgs containing data related to this event. The following InternetServer.TimeoutEventArgs property provides information specific to this event.

Property Description
Handle Gets a value that specifies the socket handle for the client session.

Remarks

The OnTimeout event occurs when a blocking operation, such as sending or receiving data on the socket, fails to complete before the specified timeout period elapses. The timeout period for a blocking operation can be adjusted by setting the Timeout property.

User interface controls can only be accessed from the UI thread that created them, and attempting to update a control from another thread can result in the program becoming non-responsive or terminating abnormally. Because this event is generated in the context of the client thread, not the thread that created the class instance, you cannot directly modify a control from within this event handler. Instead, you must create a delegate and use the Invoke method to marshal invocations to the associated UI thread. For more information, refer to the documentation for the control.

See Also

InternetServer Class | SocketTools Namespace