public static void SendNotice(NoticeMode type, string content) { var param = new RequestParam(); param.Add("Type", type); param.Add("ServerID", GameEnvironment.ProductServerId); param.Add("Content", content); remote.Call("NoticeService", param, successCallback); }
private void RegisterRoomServer() { RequestParam param = new RequestParam(); param.Add("Port", ConfigUtils.GetSetting("Game.Port")); param.Add("Host", ConfigUtils.GetSetting("Game.Host")); LobbyServerSender.Send("RLRegisterRoomServerHandler", param, callback => { TraceLog.ReleaseWrite("RegisterRoomServer OK."); }); }
private void UpdateServerState(object state) { RequestParam param = new RequestParam(); param.Add("RoomCount", CacheSet.RoomCache.Count); param.Add("CpuLoad", 20 * 1000); param.Add("MemoryLoad", 20 * 1000); LobbyServerSender.Send("RLUpdateServerStateHandler", param, callback => { TraceLog.ReleaseWrite("UpdateServerState OK."); }); }
public static void SendWorldChat(int sender, string content) { var basis = UserHelper.FindUserBasis(sender); if (basis == null) { return; } var param = new RequestParam(); param.Add("Type", (int)ChatType.World); param.Add("Sender", sender); param.Add("Receiver", 0); param.Add("ServerID", basis.ServerID); param.Add("SendDate", Util.GetTimeStamp()); SendChat(param, content); }
public void SendRequestMaxUsers(RemoteService tcpRemote) { RequestParam param = new RequestParam(); param.Add("ServerID", 1); tcpRemote.Call("ServerRequestMaxUsers", param, p => { Trace.WriteLine("call1:" + p.RouteName); }); param = new RequestParam(); param.Add("ServerID", 2); param.Add("ID", 2); tcpRemote.Call("ServerRequestMaxUsers", param, p => { Trace.WriteLine("call2:" + p.RouteName); }); }
public static void SendUserData(UserBasisCache basis, string guildId) { var param = new RequestParam(); param.Add("UserId", basis.UserID); param.Add("UserName", basis.NickName); param.Add("VipLv", basis.VipLv); param.Add("Profession", basis.Profession); param.Add("AvatarUrl", basis.AvatarUrl); param.Add("ServerID", basis.ServerID); param.Add("GuildID", guildId); remote.Call("UpdateUserDataService", param, successCallback); }
public static int Action1000(int userId) { var result = 0; var param = new RequestParam(); param.Add("UserId", userId); AutoResetEvent waitHandle = new AutoResetEvent(false); tcpRemote.Call("Battle1000", param, package => { var reader = new MessageStructure(package.Message as byte[]); result = reader.ReadInt(); waitHandle.Set(); }); waitHandle.WaitOne(5000); return(result); }
private static void SendChat(RequestParam param, string content) { content = new KeyWordCheck().FilterMessage(content); param.Add("Content", content); remote.Call("ChatService", param, successCallback); }
public override bool SetRequestParam(RequestParam param) { param.Add("Data", mData); return(true); }