ICommunicationObject.Abort 方法


使通信对象立即从其当前状态转换到关闭状态。Causes a communication object to transition immediately from its current state into the closed state.

 void Abort();
public void Abort ();
abstract member Abort : unit -> unit
Public Sub Abort ()


此方法指示在返回之前应忽略或意外终止任何未完成的工作。This method indicates that any unfinished work should be ignored or ungracefully terminated before returning. Abort 方法可用于取消任何未处理的操作,包括对 Close 的未处理的调用。The Abort method can be used to cancel any outstanding operations, including outstanding calls to Close.

ICommunicationObject 从状态正常转换 OpenedClosed 状态调用 CloseTo gracefully transition an ICommunicationObject from the Opened state to the Closed state call Close.