markus / IIpc / IpcBinding.cs @ 664ea2e1
이력 | 보기 | 이력해설 | 다운로드 (1.31 KB)
1 |
using System; |
---|---|
2 |
using System.Collections.Generic; |
3 |
using System.Linq; |
4 |
using System.ServiceModel; |
5 |
using System.Text; |
6 |
using System.Threading.Tasks; |
7 |
|
8 |
namespace IIpc |
9 |
{ |
10 |
public static class IpcBinding |
11 |
{ |
12 |
public static NetNamedPipeBinding netNamedPipeBinding() |
13 |
{ |
14 |
NetNamedPipeBinding binding = new NetNamedPipeBinding |
15 |
{ |
16 |
CloseTimeout = new TimeSpan(0, 1, 0), |
17 |
OpenTimeout = new TimeSpan(0, 1, 0), |
18 |
ReceiveTimeout = new TimeSpan(0, 1, 0), |
19 |
SendTimeout = new TimeSpan(0, 1, 0), |
20 |
TransactionFlow = false, |
21 |
TransferMode = TransferMode.Buffered, |
22 |
TransactionProtocol = TransactionProtocol.OleTransactions, |
23 |
HostNameComparisonMode = HostNameComparisonMode.StrongWildcard, |
24 |
MaxBufferPoolSize = 524288, |
25 |
MaxBufferSize = 65536, |
26 |
MaxConnections = 10, |
27 |
MaxReceivedMessageSize = 65536, |
28 |
Security = new NetNamedPipeSecurity |
29 |
{ |
30 |
Mode = NetNamedPipeSecurityMode.Transport, |
31 |
Transport = new NamedPipeTransportSecurity { ProtectionLevel = System.Net.Security.ProtectionLevel.EncryptAndSign } |
32 |
} |
33 |
}; |
34 |
|
35 |
return binding; |
36 |
} |
37 |
} |
38 |
} |