Hello Anonymous Monk
To be honest after so many different approaches, I came with another possible solution to yours but I do not know if many people will think it is a good option or not. I decided not to implemented due strict documentation prerequisites but I think it could work.
In case that someone was facing a similar problem he could apply use bytes; and then no bytes;, official documentation bytes or length official documentation length. By doing so the user can get the size in bytes for the message that he wants to transmit, or the length of the message that he wants to transmit. Either way he can create a message containing the length to expect as a number or the size (Caution the user needs to subtract the size of the number after) and simple create a condition to collect all the messages together. Such as while ($msg_size != $msg) {}. This is of course a sample, but I think the idea after some experimentation can be applied.
In reply to Re^2: how to control segmented messages in TCP chat client
by thanos1983
in thread how to control segmented messages in TCP chat client
by thanos1983
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |