IDefaultCommunicationTimeouts 介面

定義

定義通道、通道管理員 (例如通道接聽程式和通道處理站) 以及服務主機用來指定通訊逾時的介面。Defines the interface for specifying communication timeouts used by channels, channel managers such as channel listeners and channel factories, and service hosts.

public interface class IDefaultCommunicationTimeouts
public interface IDefaultCommunicationTimeouts
type IDefaultCommunicationTimeouts = interface
Public Interface IDefaultCommunicationTimeouts
衍生

備註

此介面有四個唯讀屬性,為 Open、Send、Receive 和 Close 方法提供預設逾時值。這些方法可在通訊物件上呼叫。This interface has four read-only properties that provide default timeout values for the open, send, receive, and close methods that can be called on a communication object. 每個實作都負責以實作適當方式取得預設值。Each implementation is responsible for obtaining the default values in whatever manner is appropriate for the implementation. 此介面由 ChannelBase 實作,撰寫自訂通道的基礎實作,以及 ChannelManagerBaseChannelFactoryBase撰寫自訂通道管理員並且衍生至 ChannelListenerBase 及 {5}。This interface is implemented by ChannelBase, the base implementation for writing custom channels, and the ChannelManagerBase, the base implementation for writing custom channel managers which derive from ChannelFactoryBase and ChannelListenerBase. 介面也是由 Binding 類別實作,然後從那裡由 CustomBinding 繼承,以及系統提供的繫結,例如 BasicHttpBindingThe interface is also implemented by the Binding class and then inherited from there by CustomBinding and the system-provided bindings, such as BasicHttpBinding.

當您直接使用通道時,您可根據每通道或每作業基礎,或任何其他的自訂基礎明確指定逾時。When you use channels directly, you have the ability to explicitly specify timeouts on a per-channel or per-operation-basis, or on any other custom basis. 使用通道模型時,若要控制大致可使用到逾時。When using the channel model, timeouts are quite accessible when you want to control them.

另一方面,使用服務模型時,您針對服務與合約撰寫程式,逾時比較是在背景部分。When using the service model, on the other hand, you program against services and contracts, and timeouts are more in the background. 它們是由代表您在各處流動逾時的基礎結構機制所控制。They are controlled by the infrastructure machinery which flows timeouts from place to place on your behalf. IDefaultCommunicationTimeouts 就是提供此資料流的機制之一。IDefaultCommunicationTimeouts is one mechanism for providing that flow.

屬性

CloseTimeout

取得通訊物件叫用之關閉方法逾時前所經過的時間間隔。Gets the interval of time after which the close method, invoked by a communication object, times out.

OpenTimeout

取得通訊物件叫用之開啟方法逾時前所經過的時間間隔。Gets the interval of time after which the open method, invoked by a communication object, times out.

ReceiveTimeout

取得通訊物件叫用之接收方法逾時前所經過的時間間隔。Gets the interval of time after which the receive method, invoked by a communication object, times out.

SendTimeout

取得通訊物件叫用之傳送方法逾時前所經過的時間間隔。Gets the interval of time after which the send method, invoked by a communication object, times out.

適用於