예제 #1
0
 public override string ServerGetClientAddress(int connectionId)
 {
     try
     {
         return(server.GetClientAddress(connectionId));
     }
     catch (SocketException)
     {
         // using server.listener.LocalEndpoint causes an Exception
         // in UWP + Unity 2019:
         //   Exception thrown at 0x00007FF9755DA388 in UWF.exe:
         //   Microsoft C++ exception: Il2CppExceptionWrapper at memory
         //   location 0x000000E15A0FCDD0. SocketException: An address
         //   incompatible with the requested protocol was used at
         //   System.Net.Sockets.Socket.get_LocalEndPoint ()
         // so let's at least catch it and recover
         return("unknown");
     }
 }