• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# ClientInfo类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ClientInfo的典型用法代码示例。如果您正苦于以下问题:C# ClientInfo类的具体用法?C# ClientInfo怎么用?C# ClientInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ClientInfo类属于命名空间,在下文中一共展示了ClientInfo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: SevenDaysLivePlayer

 internal SevenDaysLivePlayer(ClientInfo client)
 {
     this.client = client;
     steamId = Convert.ToUInt64(client.playerId);
     Character = this;
     Object = GameManager.Instance.World.Players.dict[client.entityId].transform.gameObject;
 }
开发者ID:yas-online,项目名称:Oxide,代码行数:7,代码来源:SevenDaysLivePlayer.cs


示例2: CheckWatchlist

 public static void CheckWatchlist(ClientInfo _cInfo)
 {
     if (Dict.ContainsKey(_cInfo.playerId))
     {
         List<ClientInfo> _cInfoList = ConnectionManager.Instance.GetClients();
         foreach (ClientInfo _cInfo1 in _cInfoList)
         {
             if (GameManager.Instance.adminTools.IsAdmin(_cInfo1.playerId))
             {
                 string _phrase350;
                 if (!Phrases.Dict.TryGetValue(350, out _phrase350))
                 {
                     _phrase350 = "Player {PlayerName} is on the watchlist for {Reason}.";
                 }
                 string _reason = null;
                 if (Dict.TryGetValue(_cInfo.playerId, out _reason))
                 {
                     _phrase350 = _phrase350.Replace("{PlayerName}", _cInfo.playerName);
                     _phrase350 = _phrase350.Replace("{Reason}", _reason);
                     _cInfo1.SendPackage(new NetPackageGameMessage(EnumGameMessages.Chat, string.Format("[FF8000]{0}[-]", _phrase350), "Server", false, "", false));
                 }
             }
         }
     }
 }
开发者ID:dmustanger,项目名称:7dtd-ServerTools,代码行数:25,代码来源:Watchlist.cs


示例3: GetUserByTokenIDSecure

    public bool GetUserByTokenIDSecure(string tokenID, int connectionID, out ClientInfo client, out string detailMessage)
    {
        lock (lockTokenObject)
        {
            if (!TokenClients.TryGetValue(tokenID, out client))
            {
                detailMessage = "There is no User with TokenID: " + tokenID;
                Debug.LogWarning(detailMessage);
                return false;
            }
        }

        ClientInfo clientSecure;
        lock (lockConnectedObject)
        {
            if (!ConnectedClients.TryGetValue(connectionID, out clientSecure))
            {
                detailMessage = "No Client Connected from: " + client.ConnectionID;
                Debug.LogWarning(detailMessage);
                return false;
            }
        }
        if (!clientSecure.UserID.Equals(client.UserID))
        {
            detailMessage = "Client Connected from: " + client.ConnectionID+" is different from TokenID: " + tokenID;
            Debug.LogWarning(detailMessage);
            return false;
        }
        detailMessage = "Success";
        return true;
    }
开发者ID:ChaseHuegel,项目名称:LLApi-Basic-Implementation,代码行数:31,代码来源:UserManager.cs


示例4: SendAdmins

 public static void SendAdmins(ClientInfo _sender, string _message)
 {
     if (!GameManager.Instance.adminTools.IsAdmin(_sender.playerId))
     {
         string _phrase200;
         if (!Phrases.Dict.TryGetValue(200, out _phrase200))
         {
             _phrase200 = "{PlayerName} you do not have permissions to use this command.";
         }
         _phrase200 = _phrase200.Replace("{PlayerName}", _sender.playerName);
         _sender.SendPackage(new NetPackageGameMessage(EnumGameMessages.Chat, string.Format("{0}{1}[-]", CustomCommands.ChatColor, _phrase200), "Server", false, "", false));
     }
     else
     {
         List<ClientInfo> _cInfoList = ConnectionManager.Instance.GetClients();
         foreach (ClientInfo _cInfo in _cInfoList)
         {
             if (GameManager.Instance.adminTools.IsAdmin(_cInfo.playerId))
             {
                 _message = _message.Replace("@ADMINS ", "");
                 _message = _message.Replace("@admins ", "");
                 _cInfo.SendPackage(new NetPackageGameMessage(EnumGameMessages.Chat, string.Format("[FF0080]{0}[-]", _message), _sender.playerName, false, "", false));
             }
         }
     }
 }
开发者ID:dmustanger,项目名称:7dtd-ServerTools,代码行数:26,代码来源:AdminChat.cs


示例5: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        String isShowMetro = ConfigurationManager.AppSettings["ShowMetro"];
        if (String.IsNullOrEmpty(isShowMetro) || isShowMetro.ToLower() == "false")
        {
            JQMetro1.Visible = false;
            MainImg.Visible = true;
        }
        else if (isShowMetro.ToLower() == "true")
        {
            JQMetro1.Visible = true;
            MainImg.Visible = false;
        }
        var key = this.Request.QueryString["key"];
        var param = this.Request.QueryString["param"];
        if (!string.IsNullOrEmpty(key) && !string.IsNullOrEmpty(param))
        {
            try
            {
                var clientInfo = new ClientInfo() { SecurityKey = key, UseDataSet = true };
                EFServiceClient client = EFClientTools.ClientUtility.Client;
                clientInfo = client.LogOn(clientInfo);
                var locale = Request.UserLanguages.Length > 0 ? Request.UserLanguages[0] : "en-us";
                clientInfo.Locale = locale;
                clientInfo.LogonResult = LogonResult.Logoned;
                Session["ClientInfo"] = clientInfo;

                parameter.Value = DecryptParameters(param, key);
            }
            catch
            {
                Response.Redirect("Timeout.aspx", true);
            }
        }
    }
开发者ID:san90279,项目名称:UK_OAS,代码行数:35,代码来源:MainPage_Flow.aspx.cs


示例6: Start

 void Start()
 {
     Socket sock = Sockets.CreateTCPSocket("www.myserver.com", 2345);
     client = new ClientInfo(sock, false); // Don't start receiving yet
     client.OnReadBytes += new ConnectionReadBytes(ReadData);
     client.BeginReceive();
 }
开发者ID:Axure,项目名称:Bilibili-Client,代码行数:7,代码来源:SimpleClient.cs


示例7: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        string strFullUrl = Request.Url.ToString();
        string url = strFullUrl.Substring(strFullUrl.IndexOf("RedirectUrl") + 12);
        var publicKey = this.Request.QueryString["PublicKey"];

        if (!string.IsNullOrEmpty(url) && !string.IsNullOrEmpty(publicKey))
        {
            try
            {
                var clientInfo = new ClientInfo() { SecurityKey = publicKey, UseDataSet = true };
                EFServiceClient client = EFClientTools.ClientUtility.Client;
                clientInfo = client.LogOn(clientInfo);
                var locale = Request.UserLanguages.Length > 0 ? Request.UserLanguages[0] : "en-us";
                clientInfo.Locale = locale;
                clientInfo.LogonResult = LogonResult.Logoned;
                Session["ClientInfo"] = clientInfo;
                Response.Redirect(url);
            }
            catch(Exception ex)
            {
                Response.Write(ex.Message);
            }
        }
        else
        {
            Response.Write("PublishKey is null or url is null.");
        }
    }
开发者ID:san90279,项目名称:UK_OAS,代码行数:29,代码来源:SingleSignOn.aspx.cs


示例8: Execute

 public static void Execute( ClientInfo ci, byte param1, byte param2a, byte param2b )
 {
     ci.PrimaryCave[data1offset + 24] = param1;
     ci.PrimaryCave[data1offset + 28] = param2b;
     ci.PrimaryCave[data1offset + 29] = param2a;
     Memory.Write( ci.Handle, ci.CaveAddress, ci.PrimaryCave, true );
 }
开发者ID:FreeReign,项目名称:UOMachine,代码行数:7,代码来源:Assembler.cs


示例9: PlayerLogin

 public override void PlayerLogin(ClientInfo _cInfo, string _compatibilityVersion)
 {
     if (ReservedSlots.IsEnabled)
     {
         ReservedSlots.CheckReservedSlot(_cInfo);
     }
 }
开发者ID:dmustanger,项目名称:7dtd-ServerTools,代码行数:7,代码来源:Api.cs


示例10: LogOn

    public string LogOn(string userId, string password, string dataBase, string solution)
    {
        EFServiceClient client = EFClientTools.ClientUtility.Client;
        EFClientTools.ClientUtility.ServerIPAddress = client.GetServerIPAddress();
        var ipAddress = HttpContext.Current.Request.UserHostAddress;
        var clientInfo = new ClientInfo()
        {
            UserID = userId,
            Password = password,
            Database = dataBase,
            Solution = solution,
            IPAddress = ipAddress,
            Locale = "en-us",
            UseDataSet = true
        };
        if(clientInfo.UserID.Contains("'"))
        {
            return string.Empty;
        }
        var result = client.LogOn(clientInfo);

        client = EFClientTools.ClientUtility.Client;
        if (result.LogonResult == LogonResult.Logoned)
        {
            return result.SecurityKey;
        }
        else
        {
            return string.Empty;
        }
    }
开发者ID:san90279,项目名称:UK_OAS,代码行数:31,代码来源:SingleSignOn.cs


示例11: SetLastPMSender

 public static void SetLastPMSender(ClientInfo _sender, ClientInfo _receiver)
 {
     if (senderOfLastPM.ContainsKey (_receiver))
         senderOfLastPM [_receiver] = _sender;
     else
         senderOfLastPM.Add (_receiver, _sender);
 }
开发者ID:Ketchu13,项目名称:7dtd_Commands_Extended,代码行数:7,代码来源:PrivateMassageConnections.cs


示例12: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        var key = this.Request.QueryString["key"];
        var param = this.Request.QueryString["param"];
        if (!string.IsNullOrEmpty(key) && !string.IsNullOrEmpty(param))
        {
            try
            {
                var clientInfo = new ClientInfo() { SecurityKey = key, UseDataSet = true };
                EFServiceClient client = EFClientTools.ClientUtility.Client;
                clientInfo = client.LogOn(clientInfo);
                var locale = Request.UserLanguages.Length > 0 ? Request.UserLanguages[0] : "en-us";
                clientInfo.Locale = locale;
                clientInfo.LogonResult = LogonResult.Logoned;
                Session["ClientInfo"] = clientInfo;

                parameter.Value = DecryptParameters(param, key);
            }
            catch
            {
                Response.Redirect("Timeout.aspx", true);
            }
        }
        else
        {
            Response.Redirect("Timeout.aspx", true);
        }
    }
开发者ID:san90279,项目名称:UK_OAS,代码行数:28,代码来源:FlowEmail.aspx.cs


示例13: Verify

 public override void Verify(ClientInfo clientInfo)
 {
     Assert.NotNull(clientInfo);
       AssertMatch(Family,clientInfo.Device.Family,"Family");
       AssertMatch(IsMobile, clientInfo.Device.IsMobile, "IsMobile");
       AssertMatch(IsSpider, clientInfo.Device.IsSpider, "IsSpider");
 }
开发者ID:kevinastone,项目名称:ua-parser,代码行数:7,代码来源:DeviceYamlTestCase.cs


示例14: AddClient

 public void AddClient(int id, ClientInfo client)
 {
     lock (this)
     {
         clients[lastClientID] = client;
     }
     Context.Current.UpdateTrayIcon();
 }
开发者ID:chzh,项目名称:xrefresh,代码行数:8,代码来源:Server.cs


示例15: GM_SavePlayerData

 public static void GM_SavePlayerData(ClientInfo _cInfo, PlayerDataFile _playerDataFile)
 {
     try {
         PersistentContainer.Instance.Players[_cInfo.playerId, true].Update (_playerDataFile);
     } catch (Exception e) {
         Log.Out ("Error in GM_SavePlayerData: " + e);
     }
 }
开发者ID:Ketchu13,项目名称:7dtd_Server-Fixes,代码行数:8,代码来源:PlayerDataStuff.cs


示例16: Start

 // Use this for initialization
 void Start()
 {
     _controller = new Controller();
     _princessHasShot = false;
     coolDownValue = 1.0f;
     currCD = 0.0f;
     this.clientInfo = this.transform.parent.GetComponent<ClientInfo>();
 }
开发者ID:Rominet,项目名称:MeshLegion,代码行数:9,代码来源:PerfumeSprayScript.cs


示例17: SendTo

 /// <summary>
 /// Send a message to the host.
 /// </summary>
 /// <param name="clientInfo">Client identifier.</param>
 /// <param name="buildMessage">Message to send.</param>
 public void SendTo(ClientInfo clientInfo, byte[] buildMessage)
 {
     lock (server)
     {
         server.SendMore(clientInfo.Id);
         server.Send(buildMessage);
     }
 }
开发者ID:paralin,项目名称:MatrixServer,代码行数:13,代码来源:LoginNode.cs


示例18: Verify

    public override void Verify(ClientInfo clientInfo)
    {
      Assert.NotNull(clientInfo);
      AssertMatch(Family, clientInfo.UserAgent.Family, "Family");
      AssertMatch(Major, clientInfo.UserAgent.Major, "Major");
      AssertMatch(Minor, clientInfo.UserAgent.Minor, "Minor");
      AssertMatch(Patch, clientInfo.UserAgent.Patch, "Patch");

    }
开发者ID:FunksMaName,项目名称:ua-parser,代码行数:9,代码来源:DeviceYamlTestCase.cs


示例19: CheckPing

 public static void CheckPing(ClientInfo _cInfo)
 {
     string _steamid = _cInfo.playerId;
     if (_cInfo.ping > MAXPING && !_whiteListPlayers.ContainsKey(_steamid))
     {
         Log.Out("Kicking (" + _cInfo.playerName + ") for high ping. (" + _cInfo.ping + ") Max is " + MAXPING + ".");
         GameManager.Instance.GameMessageServer(_cInfo, "[FF8000]Kicking (" + _cInfo.playerName + ") for high ping. (" + _cInfo.ping + ") Max is " + MAXPING + ".[-]", "Server");
         SdtdConsole.Instance.ExecuteSync("kick " + _cInfo.entityId + " \"Ping To High. Max Ping is " + MAXPING + ".\"", _cInfo);
     }
 }
开发者ID:dmustanger,项目名称:7dtd-High-Ping-Kicker,代码行数:10,代码来源:HighPingKicker.cs


示例20: RedisInfo

 public RedisInfo()
 {
     Replication = new ReplicationInfo();
     Clients = new ClientInfo();
     Server = new ServerInfo();
     Memory = new MemoryInfo();
     Persistence = new PersistenceInfo();
     Stats = new StatsInfo();
     CPU = new CPUInfo();
     Keyspace = new KeyspaceInfo();
 }
开发者ID:shenqiboy,项目名称:Opserver,代码行数:11,代码来源:RedisInfo.cs



注:本文中的ClientInfo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ClientMessage类代码示例发布时间:2022-05-24
下一篇:
C# ClientGCMsgProtobuf类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap