HttpListenerResponse.Abort 方法

定義

關閉與用戶端的連線,而不傳送回應。

public:
 void Abort();
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public void Abort ();
public void Abort ();
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
member this.Abort : unit -> unit
member this.Abort : unit -> unit
Public Sub Abort ()
屬性

備註

在已經關閉的物件上呼叫這個方法沒有任何作用。 如果尚未關閉回應,這個方法會關閉它和相關聯的 HttpListenerRequestHttpListenerContext 物件。 不論用戶端要求的屬性值為何, KeepAlive 客戶端的連接也會關閉。

適用於

另請參閱