> For the complete documentation index, see [llms.txt](https://runninghorse.gitbook.io/gdnet/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://runninghorse.gitbook.io/gdnet/net.scene/onhasconnect.md).

# OnHasConnect

```
    /// <summary>
    /// 当有客户端连接
    /// </summary>
    /// <param name="client">客户端套接字</param>
    protected virtual void OnHasConnect(Player client)
    {
        if (client.RemotePoint != null)
            Debug.Log("有客户端连接:" + client.RemotePoint.ToString());
        else if (client.Client != null)
            Debug.Log("有客户端连接:" + client.Client.RemoteEndPoint.ToString());
    }
```
