Beispiel #1
0
 public void Stop()
 {
     if (_active)
     {
         _server.Stop();
     }
 }
Beispiel #2
0
 public void Stop()
 {
     _authServer.Stop();
     _msgServer.Stop();
     _areaServer.Stop();
     _running = false;
     NecromancyBot.Stop();
     AppDomain.CurrentDomain.UnhandledException -= CurrentDomainOnUnhandledException;
 }
 public void Stop()
 {
     if (Settings.Active)
     {
         Bridge.Stop();
         _server.Stop();
         _Stop();
     }
 }
 public void Stop()
 {
     _server.Stop();
     _isRunning = false;
     if (_consumerThread != null && Thread.CurrentThread != _consumerThread && !_consumerThread.Join(1000))
     {
         _consumerThread.Interrupt();
     }
 }
Beispiel #5
0
 public void Stop()
 {
     necromancyBot.Send_ServerStatus("Bye Byte, I'm Offline");
     _authServer.Stop();
     _msgServer.Stop();
     _areaServer.Stop();
     _running = false;
     necromancyBot.Stop();
     AppDomain.CurrentDomain.UnhandledException -= CurrentDomainOnUnhandledException;
 }
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 Stop()
 {
     _tcpServer.Stop();
 }
 public void Stop()
 {
     _authServer.Stop();
     _msgServer.Stop();
     _areaServer.Stop();
 }
 public void Stop()
 {
     _server.Stop();
 }
Beispiel #11
0
 public void Stop()
 {
     _authServer.Stop();
     _webServer.Stop();
 }