Ejemplo n.º 1
0
        public static ILog GetLogger()
        {
            SimpleServer.Initialize();
            var frame  = new StackFrame(1);
            var method = frame.GetMethod();
            var type   = method.DeclaringType;
            var name   = method.Name;

            return(new Log(type));
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            ConsoleUtils.ChangeTitle("Chronos 1.1.0");

            SimpleServer.DrawAscii();
            SimpleServer server = new SimpleServer();

            Console.WriteLine(" ");
            ConsoleUtils.WriteMessageInfo("Initializing all stuffs !");


            server.Initialize();

            server.Start(SimpleServer.Host, SimpleServer.Port);

            ConsoleUtils.WriteMessageInfo("Server Started !");
            ConsoleUtils.WriteMessageInfo($"Listening on ip {SimpleServer.Host} and on port {SimpleServer.Port} !");

            Console.ReadLine();
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            ConsoleUtils.ChangeTitle("Janus 1.1.0");

            SimpleServer.DrawAscii();

            Console.WriteLine(" ");
            ConsoleUtils.WriteMessageInfo("Initializing all stuffs !");

            SimpleServer.Initialize();

            Console.WriteLine(" ");

            SimpleServer authServer = new SimpleServer(ServerEnum.AuthServer);

            authServer.Start(SimpleServer.AuthHost, SimpleServer.AuthPort);

            SimpleServer worldServer = new SimpleServer(ServerEnum.WorldServer);

            worldServer.Start(SimpleServer.WorldHost, SimpleServer.WorldPort);

            SimpleServer msgServer = new SimpleServer(ServerEnum.MsgServer);

            msgServer.Start(SimpleServer.MsgHost, SimpleServer.MsgPort);

            SimpleServer lobbyServer = new SimpleServer(ServerEnum.LobbyServer);

            lobbyServer.Start(SimpleServer.LobbyHost, SimpleServer.LobbyPort);

            SimpleServer relayServer = new SimpleServer(ServerEnum.RelayServer);

            relayServer.Start(SimpleServer.RelayHost, SimpleServer.RelayPort);

            SimpleServer p2pServer = new SimpleServer(ServerEnum.P2PServer);

            p2pServer.Start(SimpleServer.P2PHost, SimpleServer.P2PPort);

            Console.ReadLine();
        }
Ejemplo n.º 4
0
 internal static ILog GetLogger(SimpleServerHost host)
 {
     SimpleServer.Initialize();
     return(new Log(host.FQDN));
 }
Ejemplo n.º 5
0
 public static void AddWriter(TextWriter writer)
 {
     SimpleServer.Initialize();
     Writers.Add(writer);
 }