Class NetTcpRelayBindingBase
- Namespace
- Microsoft.ServiceBus
- Assembly
- Microsoft.ServiceBus.dll
The base class for common methods for the NetTcpRelayBinding binding.
public abstract class NetTcpRelayBindingBase : Binding, IBindingRuntimePreferences
- Inheritance
-
NetTcpRelayBindingBase
- Implements
-
IBindingRuntimePreferences
- Derived
Constructors
NetTcpRelayBindingBase()
Initializes a new instance of the NetTcpRelayBindingBase class.
protected NetTcpRelayBindingBase()
NetTcpRelayBindingBase(EndToEndSecurityMode, RelayClientAuthenticationType)
Initializes a new instance of the NetTcpRelayBindingBase class, using the specified security mode and relay authentication type.
protected NetTcpRelayBindingBase(EndToEndSecurityMode securityMode, RelayClientAuthenticationType relayClientAuthenticationType)
Parameters
securityMode
EndToEndSecurityModeThe type of security used with the binding.
relayClientAuthenticationType
RelayClientAuthenticationTypeThe type of relay authentication used.
NetTcpRelayBindingBase(TcpRelayTransportBindingElement, BinaryMessageEncodingBindingElement, NetTcpRelaySecurity)
Initializes a new instance of theNetTcpRelayBindingBase class, using the specified transport, encoding, and security.
protected NetTcpRelayBindingBase(TcpRelayTransportBindingElement transport, BinaryMessageEncodingBindingElement encoding, NetTcpRelaySecurity security)
Parameters
transport
TcpRelayTransportBindingElementThe transport.
encoding
BinaryMessageEncodingBindingElementThe encoding.
security
NetTcpRelaySecurityThe security.
NetTcpRelayBindingBase(string)
Initializes a new instance of the NetTcpRelayBindingBase class, using the specified configuration name.
protected NetTcpRelayBindingBase(string configurationName)
Parameters
configurationName
stringThe binding configuration name.
Fields
encoding
The encoding element for the current instance.Along with the security and transport settings, the encoding forms the three core properties of a binding.
protected BinaryMessageEncodingBindingElement encoding
Field Value
- BinaryMessageEncodingBindingElement
transport
The transport element for the current instance.Along with the encoding and security, the transport setting forms the core properties of a binding.
protected TcpRelayTransportBindingElement transport
Field Value
Properties
ConnectionMode
public TcpRelayConnectionMode ConnectionMode { get; set; }
Property Value
- TcpRelayConnectionMode
Returns a TcpRelayConnectionMode that contains the connection mode; either Hybrid or Relayed. The default is Relayed.
EnvelopeVersion
Gets the version of SOAP that is used for messages processed by this binding.
public EnvelopeVersion EnvelopeVersion { get; }
Property Value
- EnvelopeVersion
Returns a System.ServiceModel.EnvelopeVersion that contains the envelope version used for this binding.
HostNameComparisonMode
Gets or sets the comparison mode used on the hostname.
public HostNameComparisonMode HostNameComparisonMode { get; set; }
Property Value
- HostNameComparisonMode
The comparison mode used on the hostname.
IsDynamic
Gets or sets whether the relay binding is dynamic.
public bool IsDynamic { get; set; }
Property Value
- bool
true if the relay binding is dynamic; otherwise, false.
ListenBacklog
Gets or sets the maximum number of queued connection requests that can be pending.
public int ListenBacklog { get; set; }
Property Value
- int
Returns the maximum number of queued connection requests that can be pending. The default is 10.
MaxBufferPoolSize
Gets or sets the maximum size allowed for a buffer pool that stores messages processed by the binding.
public long MaxBufferPoolSize { get; set; }
Property Value
- long
Returns the maximum size, in bytes, allowed for a buffer pool that stores messages processed by the binding. The default value is 65,536.
MaxBufferSize
Gets or sets a value that specifies the maximum size of the buffer used to store messages in memory.
public int MaxBufferSize { get; set; }
Property Value
- int
Returns the maximum size, in bytes, of the buffer used to store messages in memory. The default value is 65,536.
MaxConnections
Gets or sets a value that controls the maximum number of connections to be pooled for subsequent reuse on the client and the maximum number of connections allowed to be pending dispatch on the server.
public int MaxConnections { get; set; }
Property Value
- int
On the client, returns the maximum number of connections to be pooled for subsequent reuse; on the server, returns the maximum number of connections allowed to be pending dispatch.
MaxReceivedMessageSize
Gets or sets the maximum size for a received message that is processed by the binding.
public long MaxReceivedMessageSize { get; set; }
Property Value
- long
Returns the maximum size, in bytes, for a received message that is processed by the binding. The default value is 65,536.
MessageSecurityVersion
Gets the message security version.
protected MessageSecurityVersion MessageSecurityVersion { get; }
Property Value
- MessageSecurityVersion
Returns a System.ServiceModel.MessageSecurityVersion that contains the message security version. This currently always returns MessageSecurityVersion..::.WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11.
ReaderQuotas
Gets or sets constraints on the complexity of SOAP messages that can be processed by endpoints configured with this binding. This property cannot be null.
public XmlDictionaryReaderQuotas ReaderQuotas { get; set; }
Property Value
- XmlDictionaryReaderQuotas
Returns a System.Xml.XmlDictionaryReaderQuotas that specifies the complexity constraints on soap messages exchanged. The default values for these constraints are provided in the following Remarks section.
Exceptions
- ArgumentNullException
if ReaderQuotas is null
Scheme
Gets the URI scheme for the transport.
public override string Scheme { get; }
Property Value
- string
Returns the URI scheme for the transport. The default is “sb”.
Security
Gets an object that specifies the type of security used with services configured with this binding.
public NetTcpRelaySecurity Security { get; }
Property Value
- NetTcpRelaySecurity
Returns NetTcpRelaySecurity, which contains the types of security used with this binding. The default mode of security is Transport.
TransferMode
Gets or sets a value that indicates whether the service configured with the binding uses streamed or buffered (or both) modes of message transfer.
public TransferMode TransferMode { get; set; }
Property Value
- TransferMode
Returns a System.ServiceModel.TransferMode that indicates whether the service configured with the binding uses streamed or buffered (or both) modes of message transfer. By default, the HTTP, TCP/IP, and named pipe transports use buffered message transfers.
Methods
ApplyConfiguration(string)
Applies the settings from the configuration element that corresponds to the specified name to the current instance of this binding element.
protected virtual void ApplyConfiguration(string configurationName)
Parameters
configurationName
stringThe name of the configuration element to take the settings from.
Exceptions
- System.Configuration.ConfigurationErrorsException
Did not find the binding element specified by the input configuration name in the configuration.
CreateBindingElements()
Retrieves an ordered collection of binding elements contained in the current binding.
public override BindingElementCollection CreateBindingElements()
Returns
- BindingElementCollection
Returns a System.ServiceModel.Channels.BindingElementCollection that makes up the binding.
CreateMessageSecurity()
Creates the security binding element for the current instance.
protected abstract SecurityBindingElement CreateMessageSecurity()
Returns
- SecurityBindingElement
Returns a System.ServiceModel.Channels.SecurityBindingElement that contains the security binding element.
IsBindingElementsMatch(TcpRelayTransportBindingElement, BinaryMessageEncodingBindingElement)
Determines whether the specified binding elements match the default values of the binding elements in the current instance.
protected bool IsBindingElementsMatch(TcpRelayTransportBindingElement transport, BinaryMessageEncodingBindingElement encoding)
Parameters
transport
TcpRelayTransportBindingElementThe transport binding element.
encoding
BinaryMessageEncodingBindingElementThe encoding binding element.
Returns
- bool
true if the elements match; otherwise, false.