I had to modify the protocol, so that the client knew what version the server is.

This way I can begin to develop more complex protocols.
This commit is contained in:
Charles Lohr
2004-03-25 15:08:07 +00:00
parent d2408a88ea
commit c98579d478
2 changed files with 17 additions and 2 deletions
+15 -2
View File
@@ -18,8 +18,21 @@
NetworkSyncManager::NetworkSyncManager(int argc, char **argv)
{
NetPlayerClient = new EzSockets;
if (argc > 1)
Connect(argv[1],8765);
m_ServerVersion = 0;
if (argc > 2)
if (Connect(argv[1],8765) == true)
{
useSMserver = true;
int ClientCommand=3;
NetPlayerClient->send((char*) &ClientCommand, 4);
NetPlayerClient->receive(m_ServerVersion);
//If network play is desired
//AND the connection works
//Halt until we know what server
//version we're dealing with
} else
useSMserver = false;
else
useSMserver = false;
}