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

◆ ReadTimeout

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

Definition at line 60 of file NetworkStream.cs.

61 {
62 get
63 {
64 int num = (int)_streamSocket.GetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReceiveTimeout);
65 if (num == 0)
66 {
67 return -1;
68 }
69 return num;
70 }
71 set
72 {
73 if (value <= 0 && value != -1)
74 {
75 throw new ArgumentOutOfRangeException("value", System.SR.net_io_timeout_use_gt_zero);
76 }
77 SetSocketTimeoutOption(SocketShutdown.Receive, value, silent: false);
78 }
79 }
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