Пример #1
0
        public Session(AuroraServer server, TcpClient client)
        {
            this.server = server;
            stream = client.GetStream();

            State = SessionState.Connecting;

            BindExport(0, Util.FNV32A("bnet.protocol.connection.ConnectionService"));
            BindImport(0, Util.FNV32A("bnet.protocol.connection.ConnectionService"));
        }
Пример #2
0
        public Server(AuroraServer authServer)
        {
            this.authServer = authServer;

            if(!File.Exists(DatabaseFile)) throw new FileNotFoundException("Can't find database", DatabaseFile);

            Database = new SQLiteConnection(DatabaseFile);

            Thread t = new Thread(Listen);
        }
Пример #3
0
        public static void Main(string[] args)
        {
            Console.Title = "Hestia";

            Debug.Listeners.Add(new DebugListener());

            AuroraServer bnet = new AuroraServer();
            bnet.RegisterGame("WTCG", new Pegasus.Server(bnet));

            try {
                bnet.Listen(IPAddress.Parse(Host), Port);
            } catch(Exception e) {
                Debug.WriteLine(e);
            }
        }