ReceiveTimeout









How do I use Receive Timeout
Below are practical examples compiled from projects for learning and reference purposes

Featured Snippets

Line Code Ex..
27 sock.ReceiveTimeout = 5000; 1

File name: PingCloudRegions.cs Copy
21     public override bool StartPing(string ip)
22     {
23         base.Init();
24
25         try
26         {
27             sock.ReceiveTimeout = 5000;
28             sock.Connect(ip, 5055);
29
30             PingBytes[PingBytes.Length - 1] = PingId;
31             sock.Send(PingBytes);
32             PingBytes[PingBytes.Length - 1] = (byte)(PingId - 1);
33         }
34         catch (Exception e)
35         {
36             sock = null;
37             Console.WriteLine(e);
38         }
39
40         return false;
41     }

ReceiveTimeout 109 lượt xem

Gõ tìm kiếm nhanh...