Exemplo n.º 1
0
        static void Main(string[] args)
        {
            if (!Directory.Exists("Settings") && !File.Exists("Settings/config.ini"))
            {
                Configuration.CreateFolder("Settings");
                Configuration.CreateFile("Settings/config.ini");
                Configuration.SetConfigurationFile("Settings/config.ini");
                Configuration.AppendValues("version", Assembly.GetExecutingAssembly().GetName().Version.ToString());
            }

            Configuration.SetConfigurationFile("Settings/config.ini");
            Configuration.ReadConfigurationFile();
            Configuration.PopValue<string>("version", out Version);

            Logging.SetTitle("FerriEmulator - v{0}", Version);
            Logging.WriteTagLine("Debug", "Initializing Ferri v{0} for {1}", Version, Environment.UserName);

            dbManager.CreateConnectionString();

            GetHabboHotel.LoadHH();

            ServerSocketSettings Settings = new ServerSocketSettings()
            {
                Backlog = 10,
                BufferSize = 512,
                Endpoint = new System.Net.IPEndPoint(System.Net.IPAddress.Any, 30000),
                MaxConnections = 10000,
                MaxSimultaneousAcceptOps = 15,
                NumOfSaeaForRec = 10000,
                NumOfSaeaForSend = 20000
            };

            Network = new ServerSocket(Settings);
            Network.Init();
            Network.StartListen();

            Remote = new RemoteNetwork(30001);
            Logging.WriteTagLine("Ready", "Initialized FerriEmulator, ready for connections!");

            Console.WriteLine();

            while (true)
                Console.ReadLine();
        }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the Session class.
 /// </summary>
 /// <param name="manager">The manager which created this session.</param>
 public Session(int id, ServerSocket manager)
 {
     Id      = id;
     Manager = manager;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the Session class.
 /// </summary>
 /// <param name="manager">The manager which created this session.</param>
 public Session(int id, ServerSocket manager)
 {
     Id = id;
     Manager = manager;
 }