Communicate with embedded HTTP Server via XTC_APP_ENDPOINT
<p>I'm referring to the implementation outlined in this video:
<a href="https://www.youtube.com/watch?v=mnAenNaEpJk" rel="nofollow">https://www.youtube.com/watch?v=mnAenNaEpJk</a></p>

<p>This works fine running locally using the IP address of my device over any port (as long as the client and server use the same port).</p>

<p>Test client:</p>

<pre><code>var url = isTestCloud ? Environment.GetEnvironmentVariable("XTC_APP_ENDPOINT") : "http://" + deviceIp + ":8081";
HttpClient client = new HttpClient {
    BaseAddress = new Uri(url),
};
</code></pre>

<p>In App:</p>

<pre><code>HttpListener _listener = new HttpListener();
var prefixes = new [] {
    "http://*:8081/",
};
foreach (string s in prefixes)
    _listener.Prefixes.Add (s);
_listener.Start ();
</code></pre>

<p>This works great running locally, but when trying to run in Test Cloud, I get a <code>System.TimeoutException</code> in my Test while trying to connect to the game server.</p>

<p>From the video, James makes it clear that you must be listening on port <code>8081</code>, however this was a couple of years ago and I'm wondering if it has changed. I also tried changing <code>8081</code> to <code>37777</code>. But I still had the same result.</p>

<p>I noticed the XTC_APP_ENDPOINT env variable returns something like: <code>http://devicehost7.prod:37777/wd/token-1acaf8c0-2987-4a49-aa5b-3ab795ecb910/</code></p>

<p>I adjusted my server to use <code>37777</code>, same result.
I tried again adjusting my prefix: <code>var prefixes = new [] { "http://*:37777/*/token-*/", };</code>, but always get the same result (<code>System.TimeoutException</code>).</p>

<p>Is there any documentation I can read up on regarding how to interact with an embedded HTTP server? Or can someone point me in the right direction?</p>

<p>Thanks,
Loren</p>