コード例 #1
0
        public OutgoingMasterServerPeer(IRpcProtocol protocol, IPhotonPeer nativePeer, SelectCharacterApplication application)
            : base(protocol, nativePeer)
        {
            this.application = application;
            mInvoker         = new S2SMethodInvoker(application);

            log.InfoFormat("connection to master at {0}:{1} established (id={2}), serverId={3}", this.RemoteIP, this.RemotePort, this.ConnectionId, SelectCharacterApplication.ServerId);
            this.RequestFiber.Enqueue(this.Register);
        }
コード例 #2
0
        public SelectCharacterClientPeer(InitRequest initRequest, SelectCharacterApplication application)
            : base(initRequest.Protocol, initRequest.PhotonPeer)
        {
            this.application = application;
            invoker          = new MethodInvoker(application, this);
            mHandlers        = new Dictionary <SelectCharacterOperationCode, BaseOperationHandler>();
            mGetPool         = new Server2ServerTransactionPool <GETInventoryItemTransactionStart, GETInventoryItemTransactionEnd>(this);
            mPutPool         = new Server2ServerTransactionPool <PUTInventoryItemTransactionStart, PUTInventoryItemTransactionEnd>(this);

            mHandlers.Add(SelectCharacterOperationCode.RegisterClient, new RegisterClientOperationHandler(application, this));
            mHandlers.Add(SelectCharacterOperationCode.GetCharacters, new GetCharactersOperationHandler(application, this));
            mHandlers.Add(SelectCharacterOperationCode.DeleteCharacter, new DeleteCharacterOperationHandler(application, this));
            mHandlers.Add(SelectCharacterOperationCode.CreateCharacter, new CreateCharacterOperationHandler(application, this));
            mHandlers.Add(SelectCharacterOperationCode.SelectCharacter, new SelectCharacterOperationHandler(application, this));
            mHandlers.Add(SelectCharacterOperationCode.GetMails, new GetMailBoxOperationHandler(application, this));
            mHandlers.Add(SelectCharacterOperationCode.WriteMailMessage, new WriteMessageOperationHandler(application, this));
            mHandlers.Add(SelectCharacterOperationCode.DeleteMailMessage, new DeleteMessageOperationHandler(application, this));
            mHandlers.Add(SelectCharacterOperationCode.MoveAttachmentToStation, new MoveAttachmentToStationOperationHandler(application, this));
            mHandlers.Add(SelectCharacterOperationCode.GetNotifications, new GetNotificationsOperationHandler(application, this));
            mHandlers.Add(SelectCharacterOperationCode.HandleNotification, new HandleNotificationOperationHandler(application, this));
            mHandlers.Add(SelectCharacterOperationCode.InvokeMethod, new InvokeMethodOperationHandler(application, this));
            mHandlers.Add(SelectCharacterOperationCode.CreateGuild, new CreateGuildOperationHandler(application, this));
            mHandlers.Add(SelectCharacterOperationCode.GetGuild, new GetGuildOperationHandler(application, this));
            mHandlers.Add(SelectCharacterOperationCode.InviteToGuild, new InviteToGuildOperationHandler(application, this));
            mHandlers.Add(SelectCharacterOperationCode.ExitGuild, new ExitGuildOperationHandler(application, this));
            mHandlers.Add(SelectCharacterOperationCode.DeleteGuild, new DeleteGuildOperationHandler(application, this));
            mHandlers.Add(SelectCharacterOperationCode.SetGuildDescription, new SetGuildDescriptionOperationHandler(application, this));
            mHandlers.Add(SelectCharacterOperationCode.ChangeGuildMemberStatus, new ChangeGuildMemberStatusOperationHandler(application, this));
            mHandlers.Add(SelectCharacterOperationCode.GetPlayerStore, new GetPlayerStoreOperationHandler(application, this));
            mHandlers.Add(SelectCharacterOperationCode.BuyAuctionItem, new BuyAuctionItemOperationHandler(application, this));
            mHandlers.Add(SelectCharacterOperationCode.DeleteAuctionItem, new DeleteAuctionItemOperationHandler(application, this));
            mHandlers.Add(SelectCharacterOperationCode.SetNewPrice, new SetNewPriceOperationHandler(application, this));
            mHandlers.Add(SelectCharacterOperationCode.SendPushToPlayers, new SendPushToPlayersOperationHandler(application, this));
            mHandlers.Add(SelectCharacterOperationCode.MoveItemFromStationToBank, new MoveItemFromStationToBankOperationHandler(application, this));
            mHandlers.Add(SelectCharacterOperationCode.MoveItemFromBankToStation, new MoveItemFromBankToStationOperationHandler(application, this));
            mHandlers.Add(SelectCharacterOperationCode.BuyPvpItem, new BuyPvpItemOperationHandler(application, this));
            mHandlers.Add(SelectCharacterOperationCode.RequestServerId, new RequestServerIDOperationHandler(application, this));
            mHandlers.Add(SelectCharacterOperationCode.RPCInvokeMethod, new RPCInvokeMethodOperationHandler(application, this));
        }
コード例 #3
0
ファイル: MethodInvoker.cs プロジェクト: OlegGelezcov/neb
 public MethodInvoker(SelectCharacterApplication inApplication, SelectCharacterClientPeer inPeer)
 {
     application = inApplication;
     peer        = inPeer;
 }
コード例 #4
0
 public S2SMethodInvoker(SelectCharacterApplication application)
 {
     mApplication = application;
 }