ok here it is, I am basically teaching myself to program which is going so good so far.I am doing a client-server program which is just a basic chat and then i can move on from there and improve, probably use it in a game afterward.Now as I have never done something like this and to avoid reading a dozen books i need some quick tips and insights.
1. How should i handle the states of each client with the server?
-For instance, the client connects to my server and it registers
then logs into the chat.what i want to know what would be the
best way to tell the server that my client wants to register,
should I send a extra byte at the front of my packet to tell the
server this client wants to register.
2. Should i send all my register data in the same packet?
-Name and Password are both placed into the same packet
the server then dissects the packet and place the appropriate
information where it needs to be, I have done this method works
ok but wondering if there is a better way.
What other information can you give me, I am trying to keep it as basic as possible
I am using SDL/SDL_net/C++.