IChannelListener<TChannel>.AcceptChannel Method (TimeSpan)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Accepts a channel of a specified type for communication with a client within a specified interval of time.

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

TChannel AcceptChannel(
	TimeSpan timeout


Type: System.TimeSpan

The TimeSpan that specifies how long the wait for a channel operation has to complete before timing out.

Return Value

Type: TChannel

A channel of type TChannel accepted by the listener.

It is recommended that this overload with an explicit timeout be used rather than the AcceptChannel(). The timeout specified for this method overrides any default timeouts set by the system for the service.

.NET Framework
Available since 3.0
Return to top