Inheritance: global::ProtoBuf.IExtensible
コード例 #1
0
 private void HandleGeneralMessage(Msg_LBL_Message msg_, PBChannel channel, int src, uint session)
 {
     try {
         if (msg_.MsgType == Msg_LBL_Message.MsgTypeEnum.Node) {
             m_UserProcessScheduler.DispatchJsonMessage(session, src, GetMyHandle(), msg_.Data);
         } else if (msg_.MsgType == Msg_LBL_Message.MsgTypeEnum.Room) {
             byte[] msgData = msg_.Data;
             m_UserChannel.Dispatch(src, session, msgData);
         }
     } catch (Exception ex) {
         LogSys.Log(LOG_TYPE.ERROR, "Exception:{0}\n{1}", ex.Message, ex.StackTrace);
     }
 }
コード例 #2
0
 private void HandleGeneralMessage(Msg_LBL_Message msg_, PBChannel channel, int src, uint session)
 {
     try {
         if (msg_.MsgType == Msg_LBL_Message.MsgTypeEnum.Node) {
             byte[] msgData = msg_.Data;
             //观察
             m_UserProcessScheduler.DispatchJsonMessage(false, session, 0, 0, msgData);
             //转发
             NodeMessageDispatcher.ForwardMessage(msg_.TargetName, msgData);
         } else if (msg_.MsgType == Msg_LBL_Message.MsgTypeEnum.Room) {
             m_BigworldChannel.Dispatch(src, session, msg_.Data);
         }
     } catch (Exception ex) {
         LogSys.Log(LOG_TYPE.ERROR, "Exception:{0}\n{1}", ex.Message, ex.StackTrace);
     }
 }
コード例 #3
0
 internal void TransmitToWorld(int userSvrHandle, string nodeName, NodeMessage msg)
 {
     try {
         if (!string.IsNullOrEmpty(nodeName) && null != msg) {
             byte[] data = NodeMessageDispatcher.BuildNodeMessage(msg);
             if (null != data) {
                 Msg_LBL_Message builder = new Msg_LBL_Message();
                 builder.MsgType = Msg_LBL_Message.MsgTypeEnum.Node;
                 builder.TargetName = nodeName;
                 builder.Data = data;
                 m_UserChannel.Send(userSvrHandle, builder);
             }
         }
     } catch (Exception ex) {
         LogSys.Log(LOG_TYPE.ERROR, "Exception:{0}\n{1}", ex.Message, ex.StackTrace);
     }
 }
コード例 #4
0
 internal void ForwardToWorld(int userSvrHandle, object msg)
 {
     try {
         if (null != msg) {
             byte[] data = m_UserChannel.Encode(msg);
             if (null != data) {
                 Msg_LBL_Message builder = new Msg_LBL_Message();
                 builder.MsgType = Msg_LBL_Message.MsgTypeEnum.Room;
                 builder.TargetName = "UserSvr";
                 builder.Data = data;
                 m_UserChannel.Send(userSvrHandle, builder);
             }
         }
     } catch (Exception ex) {
         LogSys.Log(LOG_TYPE.ERROR, "Exception:{0}\n{1}", ex.Message, ex.StackTrace);
     }
 }