コード例 #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);
     });
 }
コード例 #2
0
ファイル: UseSocket.cs プロジェクト: zhongxiwang/bcar
        public Request SetLoginStatus(string id)
        {
            var request = CreateMsg.CreateRequest("online", "userStatus");

            request.SendUser = id;
            return(request);
        }
コード例 #3
0
        public Request updatelist()
        {
            var v = CreateMsg.CreateRequest("", new RequestType()
            {
                type = "System.GetUserList"
            });

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