コード例 #1
0
 public RpcCall(string name, Message msg, RpcCallback func, uint connId, SendMsgFunc sendResponse)
 {
     Name         = name;
     Msg          = msg;
     Func         = func;
     ConnId       = connId;
     SendResponse = sendResponse;
 }
コード例 #2
0
 public void ProcessRpc(string name, Message msg, RpcCallback func, uint connId, SendMsgFunc sendResponse)
 {
     using (m_lockObject.Lock())
     {
         if (func != null)
         {
             m_callQueue.Enqueue(new RpcCall(name, msg, func, connId, sendResponse));
         }
         else
         {
             // ReSharper disable once ExpressionIsAlwaysNull
             m_pollQueue.Enqueue(new RpcCall(name, msg, func, connId, sendResponse));
         }
         if (func != null)
         {
             m_callCond.NotifyAll();
         }
         else
         {
             m_pollCond.NotifyAll();
         }
     }
 }