Beispiel #1
0
    /**
     * 聊天-->发送聊天 RPC请求
     */
    public void SendChat(ChatMsgObjWraper ChatMsg, ReplyHandler replyCB)
    {
        ChatRpcSendChatAskWraper askPBWraper = new ChatRpcSendChatAskWraper();

        askPBWraper.ChatMsg = ChatMsg;
        ModMessage askMsg = new ModMessage();

        askMsg.MsgNum  = RPC_CODE_CHAT_SENDCHAT_REQUEST;
        askMsg.protoMS = askPBWraper.ToMemoryStream();

        Singleton <GameSocket> .Instance.SendAsk(askMsg, delegate(ModMessage replyMsg){
            ChatRpcSendChatReplyWraper replyPBWraper = new ChatRpcSendChatReplyWraper();
            replyPBWraper.FromMemoryStream(replyMsg.protoMS);
            replyCB(replyPBWraper);
        });
    }
Beispiel #2
0
 //重置函数
 public void ResetWraper()
 {
     m_ChatMsg = new ChatMsgObjWraper();
 }
Beispiel #3
0
 //构造函数
 public ChatRpcSendChatAskWraper()
 {
     m_ChatMsg = new ChatMsgObjWraper();
 }