Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ WriteTimeout

override int System.Net.Sockets.NetworkStream.WriteTimeout
getset

Definition at line 81 of file NetworkStream.cs.

82 {
83 get
84 {
85 int num = (int)_streamSocket.GetSocketOption(SocketOptionLevel.Socket, SocketOptionName.SendTimeout);
86 if (num == 0)
87 {
88 return -1;
89 }
90 return num;
91 }
92 set
93 {
94 if (value <= 0 && value != -1)
95 {
96 throw new ArgumentOutOfRangeException("value", System.SR.net_io_timeout_use_gt_zero);
97 }
98 SetSocketTimeoutOption(SocketShutdown.Send, value, silent: false);
99 }
100 }
void SetSocketTimeoutOption(SocketShutdown mode, int timeout, bool silent)
object? GetSocketOption(SocketOptionLevel optionLevel, SocketOptionName optionName)
Definition Socket.cs:2235
static string net_io_timeout_use_gt_zero
Definition SR.cs:80
Definition SR.cs:7