Occurs when an socket operation fails.
The event handler receives an argument of type InternetServer.ErrorEventArgs containing data related to this event. The following InternetServer.ErrorEventArgs properties provide information specific to this event.
| Property | Description |
|---|---|
| Description | Gets a value which describes the last error that has occurred. |
| Error | Gets a value which specifies the last error that has occurred. |
| Handle | Gets a value that specifies the socket handle that generated the error. |
The OnError event occurs when a socket operation fails.
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 may be generated in the context of the client or server 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.
InternetServer Class | SocketTools Namespace