Ping the connected host regularly and check other hosts at lower freq.

* This lets us detect when a remote server has been disconnected and
  needs to be restarted, as well as alerting the user if this happens in
  the middle of a replay session.
* Pinging other hosts means the context switcher is reasonably up to
  date if one of them comes up.
This commit is contained in:
baldurk
2016-08-23 15:21:52 +02:00
parent 0ddfd3d65b
commit f8bbedeb8b
5 changed files with 148 additions and 11 deletions
+8
View File
@@ -892,6 +892,9 @@ namespace renderdoc
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
private static extern void RemoteServer_ShutdownServerAndConnection(IntPtr real);
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
private static extern bool RemoteServer_Ping(IntPtr real);
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
private static extern bool RemoteServer_LocalProxies(IntPtr real, IntPtr outlist);
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
@@ -986,6 +989,11 @@ namespace renderdoc
return ret;
}
public bool Ping()
{
return RemoteServer_Ping(m_Real);
}
public string[] LocalProxies()
{
IntPtr mem = CustomMarshal.Alloc(typeof(templated_array));