NetPlay: Split the server out, and make the local system manage a client as well

This should be transparent, but it may cause regressions.

The idea here is that now all players, including the host of the server,
talk to the server through TCP/IP networking. This significantly reduces
our codepaths through netplay, and will prevent strange local-only bugs
from happening.

The cleanup isn't 100% finished yet. The NetPlay dialog still drives the
server through private APIs. I eventually want to sanction off the server
entirely, so all communication is done through TCP/IP. This will allow us
to have high-traffic public servers that can relay multiple games and
lobbies at a time, and split off channel and game management to people
other than the host.

This is all still just a pipe dream, though.
This commit is contained in:
Jasper St. Pierre
2013-07-22 04:21:56 -04:00
parent 9e8655fa1f
commit 3b32d3c90d
7 changed files with 294 additions and 270 deletions

View File

@ -42,6 +42,8 @@ private:
void OnHost(wxCommandEvent& event);
void OnQuit(wxCommandEvent& event);
void MakeNetPlayDiag(int port, const std::string &game, bool is_hosting);
wxTextCtrl *m_nickname_text,
*m_host_port_text,
*m_connect_port_text,
@ -85,11 +87,12 @@ private:
void OnChat(wxCommandEvent& event);
void OnQuit(wxCommandEvent& event);
void OnMemcardWriteCheck(wxCommandEvent& event);
void OnThread(wxCommandEvent& event);
void OnChangeGame(wxCommandEvent& event);
void OnAdjustBuffer(wxCommandEvent& event);
void OnConfigPads(wxCommandEvent& event);
void GetNetSettings(NetSettings &settings);
const std::string& FindGame();
wxListBox* m_player_lbox;
wxTextCtrl* m_chat_text;