예제 #1
0
        public void RunPipe()
        {
            users    = new Dictionary <ulong, int>();
            channels = new SortedDictionary <byte, SortedDictionary <byte, ChannelData> >();

            Log.Message("Connecting to Login Database...", Log.DefaultFG);
            logindb = new DatabaseHandler(Configuration.loginDBType, Configuration.loginDBIP, Configuration.loginDB, Configuration.loginDBUser, Configuration.loginDBPass);

            serverdbs = new Dictionary <int, DatabaseHandler>();

            syncHandler = new SyncHandler();

            syncHandler.SetLoginDBHandler(logindb);
            syncHandler.SetServerDBHandler(serverdbs);
            syncHandler.SetUsersData(users);
            syncHandler.SetChannelsData(channels);

            syncHandler.SetInitialCharStats(initialCharStats);
            syncHandler.SetInitialCharItems(initialCharItems);
            syncHandler.SetInitialCharSkills(initialCharSkills);
            syncHandler.SetInitialCharQuickSlots(initialCharQuickslots);

            ipcProtocol = new IPCProtocol(Configuration.masterIP.ToString(), 9001, syncHandler);
            ipcProtocol.StartSync();
        }
예제 #2
0
 public IPCReceiver(ISocket socket, IPCProtocol ipc)
 {
     serverId    = 0;
     channelId   = 0;
     this.socket = socket;
     this.ipc    = ipc;
     recvBuffer  = AwesomeSockets.Buffer.New();
     rThread     = new Thread(ReceiveThread);
     rThread.Start();
 }