Class NetTcpRelayBindingElement
- Namespace
- Microsoft.ServiceBus.Configuration
- Assembly
- Microsoft.ServiceBus.dll
A configuration element that describes a secure, reliable binding suitable for cross-machine communication through the Azure Service Bus relay.
public class NetTcpRelayBindingElement : StandardBindingElement
- Inheritance
-
NetTcpRelayBindingElement
Constructors
NetTcpRelayBindingElement()
Initializes a new instance of the NetTcpRelayBindingElement class.
public NetTcpRelayBindingElement()
NetTcpRelayBindingElement(string)
Initializes a new instance of the NetTcpRelayBindingElement class with a specified configuration name.
public NetTcpRelayBindingElement(string name)
Parameters
name
stringThe binding configuration name.
Properties
BindingElementType
Gets the type of this configuration element. (Overrides StandardBindingElement.BindingElementType.)
protected override Type BindingElementType { get; }
Property Value
ConnectionMode
Gets or sets the connection mode stored in the App.config file for this configuration.
public TcpRelayConnectionMode ConnectionMode { get; set; }
Property Value
- TcpRelayConnectionMode
Returns a TcpRelayConnectionMode that contains the connection mode The default is Relayed.
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 a value in the App.config file that specifies the maximum number of channels that can wait to be accepted on the listener.
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 a value from the App.config file that contains the maximum size for a buffer pool that stores TCP messages processed by the binding.
public long MaxBufferPoolSize { get; set; }
Property Value
- long
Returns the maximum size allowed for a buffer pool that stores messages processed by the binding. The default value is 65,536 bytes.
MaxBufferSize
Gets or sets a value from the App.config file that specifies the maximum size, in bytes, of the buffer used to store messages in memory.
public int MaxBufferSize { get; set; }
Property Value
- int
The maximum size, in bytes, of the buffer used to store messages in memory.
MaxConnections
Gets or sets a value from the App.config file that specifies the maximum number of outbound and inbound connections the service creates and accepts respectively.
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 a value from the App.config file that contains the maximum size of a message that can be received on a channel configured with this binding.
public long MaxReceivedMessageSize { get; set; }
Property Value
- long
Returns maximum size, in bytes, for a message that is processed by the binding. The default value is 65,536 bytes.
Properties
Gets a ConfigurationPropertyCollection instance that contains a collection of ConfigurationProperty objects that can be attributes or ConfigurationElement objects of this configuration element. (Overrides StandardBindingElement.Properties.)
protected override ConfigurationPropertyCollection Properties { get; }
Property Value
- ConfigurationPropertyCollection
A collection of ConfigurationProperty objects that can be attributes or ConfigurationElement objects of this configuration element.
ReaderQuotas
Gets a value from the App.config file that puts constraints on the complexity of SOAP messages that can be processed by endpoints configured with this binding.
public XmlDictionaryReaderQuotasElement ReaderQuotas { get; }
Property Value
- XmlDictionaryReaderQuotasElement
Returns a XmlDictionaryReaderQuotasElement that specifies the complexity constraints on SOAP messages exchanged. The default values for these constraints are provided in the following Remarks section.
ReliableSession
Gets a configuration element that specifies whether reliable sessions are established between channel endpoints.
public StandardBindingOptionalReliableSessionElement ReliableSession { get; }
Property Value
- StandardBindingOptionalReliableSessionElement
Returns a System.ServiceModel.Configuration.StandardBindingOptionalReliableSessionElement that indicates whether a WS-RM reliable session is established between channel endpoints. The default value is false.
Security
Gets a value from the App.config file that determines the type of security to be used with this binding.
public NetTcpRelaySecurityElement Security { get; }
Property Value
- NetTcpRelaySecurityElement
Returns a NetTcpRelaySecurityElement that contains the security settings for the associated binding. The default value is none.The NetTcpRelaySecurityElement you retrieve from the associated binding is created indirectly with a NetTcpRelayBinding. As such, after the binding is created, you cannot replace this object with a new object unless you also create a new binding. However, many members of WebHttpRelaySecurity can be set through security property. For more information on binding security, see the Security and Protection section. Along with the type of transport and encoding, the Security settings represent one of the three main properties that define this binding.
TransferMode
Gets or sets a value from the App.config file that specifies whether messages are buffered or streamed or a request or response.
public TransferMode TransferMode { get; set; }
Property Value
- TransferMode
Returns a System.ServiceModel.TransferMode that contains indicates whether the service configured with the binding uses streamed or buffered (or both) modes of message transfer. The possible values are as follows: BufferedStreamedStreamedRequestStreamedResponseThe default value is Buffered.Specifying TransferMode to Streamed implies both StreamedRequest and StreamedResponse.
Methods
InitializeFrom(Binding)
Initializes the contents of this binding configuration element from the property values of a specified binding.
protected override void InitializeFrom(Binding binding)
Parameters
binding
BindingThe binding to initialize from.
OnApplyConfiguration(Binding)
Applies the settings of this configuration element to the specified binding element.
protected override void OnApplyConfiguration(Binding binding)
Parameters
binding
BindingThe binding to update the settings of.