EnqueueDebugReturn









How do I use Enqueue Debug Return
Below are practical examples compiled from projects for learning and reference purposes

Featured Snippets


File name: SocketUdp.cs Copy
60         public override bool Disconnect()
61         {
62             if (this.ReportDebugOfLevel(DebugLevel.INFO))
63             {
64                 this.EnqueueDebugReturn(DebugLevel.INFO, "CSharpSocket.Disconnect()");
65             }
66
67             this.State = PhotonSocketState.Disconnecting;
68
69             lock (this.syncer)
70             {
71                 if (this.sock != null)
72                 {
73                     try
74                     {
75                         this.sock.Close();
76                     }
77                     catch (Exception ex)
78                     {
79                         this.EnqueueDebugReturn(DebugLevel.INFO, "Exception in Disconnect(): " + ex);
80                     }
81
82                     this.sock = null;
83                 }
84             }
85
86             this.State = PhotonSocketState.Disconnected;
87             return true;
88         }
File name: SocketUdp.cs Copy
161         public void ReceiveLoop()
162         {
163             byte[] inBuffer = new byte[this.MTU];
164             while (this.State == PhotonSocketState.Connected)
165             {
166                 try
167                 {
168                     int read = this.sock.Receive(inBuffer);
169                     this.HandleReceivedDatagram(inBuffer, read, true);
170                 }
171                 catch (Exception e)
172                 {
173                     if (this.State != PhotonSocketState.Disconnecting && this.State != PhotonSocketState.Disconnected)
174                     {
175                         if (this.ReportDebugOfLevel(DebugLevel.ERROR))
176                         {
177                             this.EnqueueDebugReturn(DebugLevel.ERROR, "Receive issue. State: " + this.State + " Exception: " + e);
178                         }
179
180                         this.HandleException(StatusCode.ExceptionOnReceive);
181                     }
182                 }
183             } //while Connected receive
184
185             // on exit of the receive-loop: disconnect socket
186             this.Disconnect();
187         }

EnqueueDebugReturn 111 lượt xem

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