Modules/EDMI_FILE_OPs/Channel.vb
2019-04-25 14:09:24 +02:00

24 lines
1014 B
VB.net

Imports System.ServiceModel
Imports System.Xml
Public Class Channel
Public Shared Function GetBinding() As NetTcpBinding
Return New NetTcpBinding() With {
.MaxReceivedMessageSize = Constants.MAX_RECEIVED_MESSAGE_SIZE,
.MaxBufferSize = Constants.MAX_BUFFER_SIZE,
.MaxBufferPoolSize = Constants.MAX_BUFFER_POOL_SIZE,
.MaxConnections = Constants.MAX_CONNECTIONS,
.Security = New NetTcpSecurity() With {
.Mode = SecurityMode.Transport,
.Transport = New TcpTransportSecurity() With {
.ClientCredentialType = TcpClientCredentialType.Windows
}
},
.ReaderQuotas = New XmlDictionaryReaderQuotas() With {
.MaxArrayLength = Constants.MAX_ARRAY_LENGTH,
.MaxStringContentLength = Constants.MAX_STRING_CONTENT_LENGTH
}
}
End Function
End Class