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(); }
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(); }