コード例 #1
0
ファイル: GameClient.cs プロジェクト: ayuexs/C-
 public void OnNetworkReceiveUnconnected(IPEndPoint remoteEndPoint, NetPacketReader reader, UnconnectedMessageType messageType)
 {
     if (messageType == UnconnectedMessageType.BasicMessage && _netClient.PeersCount == 0 && reader.GetInt() == 1)
     {
         Debug.Log("[CLIENT] Received discovery response. Connecting to: " + remoteEndPoint);
         _netClient.Connect(remoteEndPoint, "sample_app");
     }
 }