コード例 #1
0
        private async void BtnSend_OnClicked(object sender, EventArgs e)
        {
            _echo = false;
            _connection.Send(ScreenMessage.Text);
            ScreenMessage.Text = "";

            while (!_echo && !_failed)
            {
                await Task.Delay(10);
            }

            ScreenMessage.Focus();
        }
コード例 #2
0
        protected override async void OnAppearing()
        {
            base.OnAppearing();
            _echo = _failed = false;
            _connection.Open("ws://10.0.2.2:5000/");

            while (!_connection.IsOpen && !_failed)
            {
                await Task.Delay(10);
            }

            ScreenMessage.Focus();
        }