Exemple #1
0
 public bool AddSubMsgHandle(System.EventHandler <MsgHandlerEventArgs> handler)
 {
     if (natConn == null)
     {
         return(false);
     }
     natConn.SubscribeAsync($"ULZ.GDSvc/{RoomKey}", handler);
     return(true);
 }
Exemple #2
0
        public static ConsumingAgent CreateReactive(
            Original.IConnection conn,
            MyWorkerContext ctx,
            CountdownEvent cde
            )
        {
            var instance = new ConsumingAgent();

            instance._subReactive = conn.SubscribeAsync(ctx.Subject + ".>", instance.ReactiveHandler);
            instance._ctx         = ctx;
            instance._cde         = cde;
            return(instance);
        }