Пример #1
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.A))
        {
            tcpSocket.Connect("127.0.0.1", 18002);
        }



        if (Input.GetKeyDown(KeyCode.B))
        {
            byte[] tmpBytes = System.Text.Encoding.Default.GetBytes(" 1707 !!!");
            tcpSocket.Send(tmpBytes);
        }


        if (tcpSocket != null && tcpSocket.Connected())
        {
            tcpSocket.Recive();
        }
    }