示例#1
0
    public void OnBoot()
    {
        tk.TcpServer server = GameObject.FindObjectOfType <tk.TcpServer>();

        if (client)
        {
            client.Drop();
        }

        Close();
    }
示例#2
0
    public void OnBan()
    {
        tk.TcpServer server = GameObject.FindObjectOfType <tk.TcpServer>();
        if (client)
        {
            //Block client from coming back.
            if (server)
            {
                server.Block(client.GetIPAddress());
            }

            client.Drop();
        }

        Close();
    }
示例#3
0
 public void ReleaseServer()
 {
     _server = null;
 }
示例#4
0
 private void Awake()
 {
     _server = GetComponent <tk.TcpServer>();
 }