Cancel Method  
 

Cancels the current blocking network operation.

Syntax

object.Cancel

Parameters

None.

Return Value

None.

Remarks

The Cancel method cancels any blocking network operation in the current thread. This is typically used inside an event handler, causing the blocking method to return to the caller with an error indicating that the current operation was canceled. This method sets an internal flag that is periodically checked during a blocking operation, such as waiting for more data to arrive. If the current thread is not blocked at the time that this method is called, it will have no effect.

See Also

Reset Method