I am trying to connect to one of mine IOT ESP32 based web server from Xamarin Android native based project with the following code:
client = new HttpClient();
Uri uri = new Uri( "http://192.168.0.5/sensors" );
client.Timeout = TimeSpan.FromSeconds(10);
HttpResponseMessage response = client.GetAsync( uri ).GetAwaiter().GetResult();
if( response.IsSuccessStatusCode )
{
string content = response.Content.ReadAsStringAsync().GetAwaiter().GetResult();
}
Yet seems like the timout is ignored, and with or without it I am receiving
System.Net.Http.HttpRequestException: 'No route to host'
The network is all fine, and the server is reachable from practically any other OS, including microcontrollers within it except Android.