ReplyMatch
How do I use Reply Match
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
Line | Code | Ex.. |
---|---|---|
57 | bool replyMatch = PingBytes[PingBytes.Length - 1] == PingId && read == PingLength; | 1 |
File name: PingCloudRegions.cs
Copy
43 public override bool Done()
44 {
45 if (this.GotResult || sock == null)
46 {
47 return true;
48 }
49
50 if (sock.Available <= 0)
51 {
52 return false;
53 }
54
55 int read = sock.Receive(PingBytes, SocketFlags.None);
56 //Debug.Log("Got: " + SupportClass.ByteArrayToString(PingBytes));
57 bool replyMatch = PingBytes[PingBytes.Length - 1] == PingId && read == PingLength;
58 if (!replyMatch) Debug.Log("ReplyMatch is false! ");
59
60
61 this.Successful = read == PingBytes.Length && PingBytes[PingBytes.Length - 1] == PingId;
62 this.GotResult = true;
63 return true;
64 }
ReplyMatch 153 lượt xem
Gõ tìm kiếm nhanh...