Created
July 31, 2012 05:10
-
-
Save joshuacalloway/3213881 to your computer and use it in GitHub Desktop.
C# reliable TCP duplex callback
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
in ou project we use the following Binding and works perfectly. | |
<netTcpBinding> | |
<binding name="netTcpBinding" | |
receiveTimeout="Infinite"> | |
<reliableSession inactivityTimeout="00:00:10" | |
enabled="true" /> | |
</binding> | |
</netTcpBinding> | |
This is equal to the following code | |
binding.ReliableSession.Enabled = true; | |
binding.ReliableSession.InactivityTimeout = | |
TimeSpan.FromSeconds(10); | |
binding.ReceiveTimeout = TimeSpan.MaxValue; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
in ou project we use the following Binding and works perfectly. | |
<netTcpBinding> | |
<binding name="netTcpBinding" | |
receiveTimeout="Infinite"> | |
<reliableSession inactivityTimeout="00:00:10" | |
enabled="true" /> | |
</binding> | |
</netTcpBinding> | |
This is equal to the following code | |
binding.ReceiveTimeout = TimeSpan.MaxValue; | |
binding.Security.Mode = SecurityMode.None; | |
binding.ReliableSession.Enabled = true; | |
// binding.ReliableSession.InactivityTimeout = TimeSpan.FromSeconds(10); | |
binding.ReliableSession.InactivityTimeout = TimeSpan.MaxValue; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment