Ejemplo n.º 1
0
    private void OnGetIPAddressEvent(GetIPAddressEvent e)
    {
        if (e.isLocalIP) // Local IP
        {
            _localIP = e.ip;

            string text = "Local IP: ";
            if (_localIP != null)
            {
                text += _localIP;
            }
            text += "\nPublic IP: ";
            if (_publicIP != null)
            {
                text += _publicIP;
            }
            _textField_iPAddresses.text = text;
        }
        else // Public IP
        {
            _publicIP = e.ip;
            string text = "Local IP: ";
            if (_localIP != null)
            {
                text += _localIP;
            }
            text += "\nPublic IP: ";
            if (_publicIP != null)
            {
                text += _publicIP;
            }
            _textField_iPAddresses.text = text;
        }
    }
    private void OnGetIPAddressEvent(GetIPAddressEvent e)
    {
        if (e.isLocalIP) // Local IP
        {
            _localIP = e.ip;

            string text = "Local IP: ";
            if (_localIP != null)
            {
                text += _localIP;
            }
            text += "\nPublic IP: ";
            if (_publicIP != null)
            {
                text += _publicIP;
            }
            _textField_iPAddresses.text = text;
        }
        else // Public IP
        {
            _publicIP = e.ip;
            string text = "Local IP: ";
            if (_localIP != null)
            {
                text += _localIP;
            }
            text += "\nPublic IP: ";
            if (_publicIP != null)
            {
                text += _publicIP;
            }
            _textField_iPAddresses.text = text;

        }
    }