Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ServicePoint.cs
Go to the documentation of this file.
2
3namespace System.Net;
4
5public class ServicePoint
6{
7 private int _connectionLeaseTimeout = -1;
8
9 private int _maxIdleTime = 100000;
10
11 private int _receiveBufferSize = -1;
12
13 private int _connectionLimit;
14
16
18 {
19 get
20 {
22 }
23 set
24 {
25 if (value < -1)
26 {
27 throw new ArgumentOutOfRangeException("value");
28 }
30 }
31 }
32
33 public Uri Address { get; }
34
35 public int MaxIdleTime
36 {
37 get
38 {
39 return _maxIdleTime;
40 }
41 set
42 {
43 if (value < -1)
44 {
45 throw new ArgumentOutOfRangeException("value");
46 }
48 }
49 }
50
51 public bool UseNagleAlgorithm { get; set; }
52
54 {
55 get
56 {
57 return _receiveBufferSize;
58 }
59 set
60 {
61 if (value < -1)
62 {
63 throw new ArgumentOutOfRangeException("value");
64 }
66 }
67 }
68
69 public bool Expect100Continue { get; set; }
70
71 public DateTime IdleSince { get; internal set; }
72
73 public virtual Version ProtocolVersion { get; } = new Version(1, 1);
74
75
76 public string ConnectionName { get; }
77
78 public int ConnectionLimit
79 {
80 get
81 {
82 return _connectionLimit;
83 }
84 set
85 {
86 if (value <= 0)
87 {
88 throw new ArgumentOutOfRangeException("value");
89 }
91 }
92 }
93
94 public int CurrentConnections => 0;
95
97
99
100 public bool SupportsPipelining { get; } = true;
101
102
103 internal ServicePoint(Uri address)
104 {
105 Address = address;
106 ConnectionName = address.Scheme;
107 }
108
109 public bool CloseConnectionGroup(string connectionGroupName)
110 {
111 return true;
112 }
113
114 public void SetTcpKeepAlive(bool enabled, int keepAliveTime, int keepAliveInterval)
115 {
116 if (enabled)
117 {
118 if (keepAliveTime <= 0)
119 {
120 throw new ArgumentOutOfRangeException("keepAliveTime");
121 }
122 if (keepAliveInterval <= 0)
123 {
124 throw new ArgumentOutOfRangeException("keepAliveInterval");
125 }
126 }
127 }
128}
virtual Version ProtocolVersion
bool CloseConnectionGroup(string connectionGroupName)
void SetTcpKeepAlive(bool enabled, int keepAliveTime, int keepAliveInterval)
X509Certificate? Certificate
BindIPEndPoint? BindIPEndPointDelegate
X509Certificate? ClientCertificate
string Scheme
Definition Uri.cs:505
delegate IPEndPoint BindIPEndPoint(ServicePoint servicePoint, IPEndPoint remoteEndPoint, int retryCount)