PhotonSocketError









How do I use Photon Socket Error
Below are practical examples compiled from projects for learning and reference purposes

Featured Snippets


File name: SocketUdp.cs Copy
91         public override PhotonSocketError Send(byte[] data, int length)
92         {
93             lock (this.syncer)
94             {
95                 if (!this.sock.Connected)
96                 {
97                     return PhotonSocketError.Skipped;
98                 }
99
100                 try
101                 {
102                     sock.Send(data, 0, length, SocketFlags.None);
103                 }
104                 catch
105                 {
106                     return PhotonSocketError.Exception;
107                 }
108             }
109
110             return PhotonSocketError.Success;
111         }
File name: SocketUdp.cs Copy
113         public override PhotonSocketError Receive(out byte[] data)
114         {
115             data = null;
116             return PhotonSocketError.NoData;
117         }

PhotonSocketError 136 lượt xem

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