private void OnEnable()
 {
     if (NeutronServerFunctions.IsHeadlessMode() || Application.isEditor)
     {
         _TCPSocket      = new TcpListener(_EndPoint);
         _UDPSocket      = new UdpClient(_EndPoint);
         _UDPVoiceSocket = new UdpClient(new IPEndPoint(IPAddress.Any, 5056));
         //====================================\\
         _TCPSocket.Start(LISTEN_MAX);
     }
 }
예제 #2
0
 void Start()
 {
     if (NeutronServerFunctions.IsHeadlessMode())
     {
         Logger("- Server Mode Enabled");
     }
     else
     {
         if (!Application.isEditor)
         {
             Destroy(gameObject);
         }
     }
     //==========================================================================
     serverChannels.Add(new Channel(0, "Canal 1", 100));
     serverChannels.Add(new Channel(1, "Canal 2", 100));
     serverChannels.Add(new Channel(2, "Canal 3", 100));
     //===============================================================
     serverChannels[0]._rooms.Add(new Room(1001, "Sala do servidor", 40, false, true, new byte[] { }));
     //===============================================================
     Initilize();
 }