I'm new to the TCP/IP protocol, and would like to create a server for a chat, in C++.
For now, I decided to begin all my transmissions with a character to tell what's next (a login request, a message to post, the user-name of a client, ...).
So, I use values like 0x01, 0x02, ... for what is related to login, information request, ... and 0x10 for the messages.
Hopelessly, when I try to connect to my server with another program I created, I receive one transmission from the server, which begin by 0x01 (so all is still OK), but then when I reply with something beginning by 0x03, the server only receive it when I kill the client...
I think that it's the select function that doesn't say that there's something to read.
Is that normal ?
And if yes, should I replace this values by values that are printable and does not have a special meaning ?