예제 #1
0
 public void ServerStart()
 {
     server.Close();
     client.Close();
     server = new NetFileTSever.NFTServer();
     client = new NetFileTClient.NFTClient();
     server.run(Serverport);
     Debug.Log("ServerStart");
 }
예제 #2
0
 public void ClientStart()
 {
     server.Close();
     client.Close();
     server = new NetFileTSever.NFTServer();
     client = new NetFileTClient.NFTClient();
     server.run(Clientport);
     client.ConnectToIp(Serverip, Serverport);
     while (client.Transmission(EnCoder.StartMessage()) != 0)
     {
         Debug.Log("retry");
     }
     NetWorkScript.isConnected = true;
 }
예제 #3
0
 public void Start()
 {
     if (isServer)
     {
         server = new NetFileTSever.NFTServer();
         client = new NetFileTClient.NFTClient();
         server.run(Serverport);
     }
     else
     {
         server = new NetFileTSever.NFTServer();
         client = new NetFileTClient.NFTClient();
         server.run(Clientport);
         client.ConnectToIp(Serverip, Serverport);
         while (client.Transmission(EnCoder.StartMessage()) != 0)
         {
             Debug.Log("retry");
         }
         netWorkTest.isConnected = true;
     }
 }