WcfUtility.CreateTcpListenerBinding(Int64, TimeSpan, TimeSpan) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a TCP listener binding with no security for WCF communication.
public static System.ServiceModel.Channels.Binding CreateTcpListenerBinding (long maxMessageSize = 4194304, TimeSpan openTimeout = default, TimeSpan closeTimeout = default);
static member CreateTcpListenerBinding : int64 * TimeSpan * TimeSpan -> System.ServiceModel.Channels.Binding
Public Shared Function CreateTcpListenerBinding (Optional maxMessageSize As Long = 4194304, Optional openTimeout As TimeSpan = Nothing, Optional closeTimeout As TimeSpan = Nothing) As Binding
Parameters
- maxMessageSize
- Int64
Maximum size of the message in bytes. If the value is not specified or it is less than or equals to zero, a default value of 4,194,304 bytes (4 MB) is used.
- openTimeout
- TimeSpan
Timeout for opening the connection. If the value is not specified, the default value of 5 seconds is used.
- closeTimeout
- TimeSpan
Time to wait for messages to drain on the connections before aborting the connection. If the value is not specified, the default value of 5 seconds is used.
Returns
A Binding to use with WcfCommunicationListener<TServiceContract>.