Exemplo n.º 1
0
 /// <summary>
 /// 发送SOCKET消息,
 /// </summary>
 /// <param name="cmd"></param>
 /// <param name="action"></param>
 public void SendMessage(CitrusNet.NetCommand cmd, Action <CitrusNet.NetCommand> action = null)
 {
     this.Call_Ex("route,session", cmd, (header, args) =>
     {
         if (header.Errno != 0)
         {
             Util.LogWarning($"errno: {header.Errno}, error: {header.Error}, reply: {args}");
             return;
         }
         if (action != null)
         {
             action(args);
         }
     });
 }
Exemplo n.º 2
0
 /// <summary>
 /// 推送SOCKET消息
 /// </summary>
 public void PushMessage(CitrusNet.NetCommand cmd)
 {
     this.Send(cmd);
 }
Exemplo n.º 3
0
 //发送接口
 private void Call_Ex(string metas, CitrusNet.NetCommand args, CitrusNet.Phobos.RpcCallback <CitrusNet.NetCommand> callback)
 {
     Util.LogWarning($"--< Send     Message >--  msg: {args}      route:  {GetValue("route", args)}");
     this.Call(metas, args, callback);
 }