Exemple #1
0
 private void InitSocket()
 {
     if (_IpPort.text != "")
     {
         udpServer.InitSocket(int.Parse(_IpPort.text));
     }
     else
     {
         udpServer.InitSocket(GameConst.Port);
     }
 }
 /// <summary>
 /// 开启房间
 /// </summary>
 public override void OnStartHost()
 {
     base.OnStartHost();
     //print("开启房间");
     ChangeTo(lobbyPanel);
     backDelegate = StopHostClbk;
     SetServerInfo("房主", "房间 IP:" + networkAddress);
     UServer.InitSocket();
     print("启动UDP主机端广播:" + networkAddress);
 }