Dart Telnet Control
Abort Method
Description
Close the connection abruptly and release all outstanding buffers (events do not fire).
Syntax
Visual Basic
Public Sub Abort() 
Remarks

Use this method at any time to abruptly release all resources. The State property is tcpClosed when this method returns.

Destruction of the control automatically uses this method to release all resources.

When a blocking call is in progress (like Receive), and Abort is called with an immediate call to a second Receive (or other method), the first Receive method does not return until the subsequent Receive method(s) complete. It will return a ptAbort error.

Calling Abort will raise a ptAbort Error event.

Note For TCP-based controls, the Abort method performs a "hard close", with a socket LINGER option time of 0. To prevent the socket from entering a WAIT_STATE, and to immediately release it for reuse, use Abort instead of Close.

CAUTION  Use the Close method in most cases, as buffers are cleared and communications terminate gracefully. Use the Abort method only when the application in abruptly terminated while a blocking method is executing or under any other unusual circumstances.

See Also

Telnet Object  | Telnet Members


Documentation Version 1.9.3.0
© 2020 Dart Communications. All Rights Reserved.
Send comments on this topic