I don't quite understand the problem, why would the server need to wait for confirmation that the client has received the whole message? If this is being sent reliably (TCP) you can send the client all the bytes you please and as long as the connection remains established you are garanteed they will receive them in the order they were sent. I don't really see any need for the client to ACK the message as being received. On the client you just parse off each message as it comes. In your case read the message length and then read the message of that length. If you are using non blocking operations you may need to buffer data until the whole message is available to you.
So if I send different messages really quick I'm always sure that each message will arrive in the same order? That solved my potential problem, thanks
Riven, that makes perfect sense and I'm adding it right away, thanks! :-)
I love this forum. The most helpful and friendly people ever! :-D