Update:
tyreth wrote:
Files Affected:
UI/IntroScreen.cpp
network/Message.cpp
network/Message.h
network/ServerNetworkCore.cpp
server/ServerApp.cpp
server/ServerApp.h
Purpose of Change:
Updated to send information from the client regarding empire setup, and the server to receive the information.
Notes:
The client does not send the proper information yet, but just some made up information. I'm not quite sure if the server is receiving text messages properly. For example, empire_name does not seem to be received, but it could be a problem with the way I'm trying to print it. If someone else gets a chance to have a look, I'd appreciate it - ServerApp.cpp line 140.
Next I'll add the accessors for the empire window to retrieve and pass on the information the player selects. I'm still getting the hang of this network code, but enjoying it.
Update on this. I had also changed HandleMessage in the server from:
void HandleMessage(const Message& msg);
to
void HandleMessage(const Message& msg, const ServerNetworkCore::ConnectionInfo& connection);
This was so I can determine from which player a message is received. If there's any reason I shouldn't do this, or a better way, let me know please.