Ejemplo n.º 1
0
 public override void RegisterServieceRequest(ServiceRegister Register)
 {
     Register.Register("System.CountUser",
                       (Request parameter, ref Request result) =>
     {
         var res = CreateMsg.CreateRequest(GetCount(), new RequestType()
         {
             Other = "System.CountUser"
         });
         res.SendUser = "******";
         result       = res;
         res.RecUserlist.Add(parameter.SendUser);
         socket.Send(res);
     });
     Register.Register("System.GetUserList",
                       (Request parameter, ref Request result) =>
     {
         Request request = (Request)parameter;
         var res         = CreateMsg.CreateRequest(GetCount(), new RequestType()
         {
             Other = "System.GetUserList"
         });
         res.Content     = GetUserList();
         res.SendUser    = "******";
         res.RecUserlist = request.RecUserlist;
         result          = res;
         socket.Send(res);
     });
 }
Ejemplo n.º 2
0
        public Request SetLoginStatus(string id)
        {
            var request = CreateMsg.CreateRequest("online", "userStatus");

            request.SendUser = id;
            return(request);
        }
Ejemplo n.º 3
0
        public Request updatelist()
        {
            var v = CreateMsg.CreateRequest("", new RequestType()
            {
                type = "System.GetUserList"
            });

            v.RecUserlist.AddRange(userlist.Keys.ToArray());
            return(v);
        }