How should I handle interactions between the client and server. For example, instead of sending one giant heap of data all at once, I need a way for the client to request certain information at any time (at least, I think that’s how it should be done. Right?). Should I have a method that’d be something among the lines of:
final int MAP_DATA = 1,
LIVE_ENTITIES = 2
PLAYER_STATUS = 3;
void someClientMethod()
{
ServerHandler.requestInformation(MAP_DATA);
}
and just have the server listen for the number that the client sends? I’m not really sure how I should do this, and I’m entirely new to networking. Any help/advice?