Beispiel #1
0
 public void Start()
 {
     AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException;
     _authServer.Start();
     _msgServer.Start();
     _areaServer.Start();
     _running = true;
     NecromancyBot.Start();
 }
Beispiel #2
0
 public void Start()
 {
     AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException;
     _authServer.Start();
     _msgServer.Start();
     _areaServer.Start();
     _running = true;
     necromancyBot.Start();
     necromancyBot.EnqueueEvent_ServerStatus("Hello! I'm Online!");
 }
        public void Start()
        {
            AsyncEventSettings settings = new AsyncEventSettings();

            _consumer = new BlockingQueueConsumer();
            _server   = new AsyncEventServer(IPAddress.IPv6Any, 2345, _consumer, settings);
            _server.Start();
            _consumerThread      = new Thread(HandleEvents);
            _consumerThread.Name = "ConsumerThread";
            _consumerThread.Start();
        }
Beispiel #4
0
 public void Start()
 {
     if (_active)
     {
         _logger.Info("Initializing {0}", Name);
         Initialize();
         _logger.Info("Using IPAddress:{0} and Port:{1}", _server.IpAddress, _server.Port);
         _handlers.Clear();
         LoadHandles();
         _logger.Info("Loaded {0} handles", _handlers.Count);
         _server.Start();
     }
 }
 public void Start()
 {
     if (Settings.Active)
     {
         _handlers.Clear();
         LoadHandles();
         LoadScriptHandles();
         _logger.Info("Loaded {0} handles", _handlers.Count);
         _logger.Info("Listening: {0} Public: {1} Port: {2}", _server.IpAddress, Settings.PublicIpAddress,
                      _server.Port);
         _Start();
         Bridge.Start();
         _server.Start();
     }
 }
Beispiel #6
0
        public Program()
        {
            _consoleLock = new object();
            LogProvider.GlobalLogWrite += LogProviderOnGlobalLogWrite;
            AsyncEventServer login = new AsyncEventServer(IPAddress.Any, 60000, new LoginServer());
            AsyncEventServer world = new AsyncEventServer(IPAddress.Any, 12849, new WorldServer());

            login.Start();
            world.Start();
            Console.WriteLine("Press any key to exit..");
            Console.ReadKey();
            login.Stop();
            world.Stop();

            //12849
            //12594
        }
        public TcpConnectionDemo()
        {
            LogProvider.GlobalLogWrite += LogProviderOnLogWrite;

            EventConsumer serverConsumer = new EventConsumer();

            serverConsumer.ClientConnected    += ServerConsumerOnClientConnected;
            serverConsumer.ClientDisconnected += ServerConsumerOnClientDisconnected;
            serverConsumer.ReceivedPacket     += ServerConsumerOnReceivedPacket;
            AsyncEventServer server = new AsyncEventServer(IPAddress.Any, 2345, serverConsumer);

            server.Start();

            EventConsumer clientConsumer = new EventConsumer();

            clientConsumer.ClientConnected    += ClientConsumerOnClientConnected;
            clientConsumer.ClientDisconnected += ClientConsumerOnClientDisconnected;
            clientConsumer.ReceivedPacket     += ClientConsumerOnReceivedPacket;
            SyncReceiveTcpClient client = new SyncReceiveTcpClient(clientConsumer);

            client.ConnectError += ClientConsumerOnConnectError;


            client.Connect(IPAddress.Parse("127.0.0.1"), 2345, TimeSpan.Zero);
            Console.WriteLine("Demo: Press any key to send.");
            Console.ReadKey();

            client.Send(new byte[9]);
            Console.WriteLine("Demo: Press any key to disconnect.");
            Console.ReadKey();

            client.Close();
            server.Stop();
            Console.WriteLine("Demo: Press any key to exit.");
            Console.ReadKey();
        }
 public override void Start()
 {
     _tcpServer.Start();
 }
 public void Start()
 {
     _authServer.Start();
     _msgServer.Start();
     _areaServer.Start();
 }
 public void Start()
 {
     _server.Start();
 }
Beispiel #11
0
 public void Start()
 {
     _authServer.Start();
     _webServer.Start();
 }