Actually run the GenV server.

This commit is contained in:
Greg Edwards 2014-07-07 19:16:39 -04:00
parent bb3727047d
commit 2b2c967e11
3 changed files with 13 additions and 4 deletions

View File

@ -68,6 +68,9 @@
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="cert.pfx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="pad.bin">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>

View File

@ -16,7 +16,8 @@ namespace PkmnFoundations.GlobalTerminalService
InitializeComponent();
}
private GTServer4 m_server;
private GTServer4 m_server_4;
private GTServer5 m_server_5;
protected override void OnStart(string[] args)
{
@ -25,13 +26,18 @@ namespace PkmnFoundations.GlobalTerminalService
public void Start()
{
m_server = new GTServer4();
m_server.BeginPolling();
m_server_4 = new GTServer4();
m_server_4.BeginPolling();
m_server_5 = new GTServer5();
m_server_5.BeginPolling();
}
protected override void OnStop()
{
if (m_server != null) m_server.EndPolling();
if (m_server_4 != null) m_server_4.EndPolling();
// fixme: it waits for the GenIV server to stop completely before
// shutting down the GenV server. Should shut them both down async.
if (m_server_5 != null) m_server_5.EndPolling();
}
}
}

Binary file not shown.