Compartir a través de


PollingDuplexBindingElement Class

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Represents the binding element that enables duplex communication between a Silverlight 5 client and a service.

Inheritance Hierarchy

System.Object
  System.ServiceModel.Channels.BindingElement
    System.ServiceModel.Channels.PollingDuplexBindingElement

Namespace:  System.ServiceModel.Channels
Assembly:  System.ServiceModel.PollingDuplex (in System.ServiceModel.PollingDuplex.dll)

Syntax

'Declaration
Public Class PollingDuplexBindingElement _
    Inherits BindingElement
public class PollingDuplexBindingElement : BindingElement

The PollingDuplexBindingElement type exposes the following members.

Constructors

  Name Description
Public method PollingDuplexBindingElement() Initializes a new instance of the PollingDuplexBindingElement class.
Protected method PollingDuplexBindingElement(PollingDuplexBindingElement) Initializes a new instance of the PollingDuplexBindingElement class from an existing one.
Public method PollingDuplexBindingElement(PollingDuplexMode) Initializes a new instance of the PollingDuplexBindingElement class with a specified polling duplex mode.

Top

Properties

  Name Description
Public property ClientPollTimeout The interval of time that a client polling request has to complete before timing out.
Public property DuplexMode Gets or sets a value that specifies how the server behaves in response to client polling when the communication is configured for duplex polling.
Public property InactivityTimeout Gets or sets the maximum interval of time that can pass without activity on a channel before the client channel enters a faulted state.
Public property MaxPendingMessagesPerSession Gets or sets the maximum number of pending messages per session.

Top

Methods

  Name Description
Public method BuildChannelFactory<TChannel> Creates a channel factory that can be used to create a channel. (Overrides BindingElement.BuildChannelFactory<TChannel>(BindingContext).)
Public method CanBuildChannelFactory<TChannel> Determines whether a channel factory of the specified type can be built. (Overrides BindingElement.CanBuildChannelFactory<TChannel>(BindingContext).)
Public method Clone Creates a copy of the current binding element. (Overrides BindingElement.Clone().)
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetProperty<T> Gets a property from the specified BindingContext. (Overrides BindingElement.GetProperty<T>(BindingContext).)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Remarks

In duplex communication, either party can initiate a message exchange. As with non-duplex communication, the client can send a request to the service and receive an optional reply. But with duplex communication, the service itself can initiate communications by sending a message to the client at any time. This is useful in applications where data must be pushed to the client when it is updated on the server.

Windows Communication Foundation (WCF) supports several types of duplex bindings. The PollingDuplexBindingElement is an element of the PollingDuplexHttpBinding that is specifically intended to establish communications with clients like Silverlight 5, where traditional duplex transport protocols like TCP are not available and where the client cannot accept new incoming connections. The PollingDuplexHttpBinding is the only duplex binding available to use with Silverlight 5 clients.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.