HttpListenerResponse.Abort HttpListenerResponse.Abort HttpListenerResponse.Abort HttpListenerResponse.Abort Method

定義

關閉與用戶端的連線,而不傳送回應。Closes the connection to the client without sending a response.

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

備註

已經關閉的物件上呼叫這個方法沒有任何作用。Calling this method on an object that has already been closed has no effect. 如果尚未關閉的回應,這個方法會關閉它和相關聯HttpListenerRequestHttpListenerContext物件。If the response has not already been closed, this method closes it and the associated HttpListenerRequest and HttpListenerContext objects. 用戶端的連線也是已關閉,而不論KeepAlive之用戶端要求的屬性值。The connection to the client is also closed, regardless of the KeepAlive property value of the client request.

適用於

另請參閱