I am working with the 2.1 code found at the following URL: (
http://www.sfml-dev.org/documentation/2.1/classsf_1_1SocketSelector.php ).
Using the code verbatim, I have ran into the following issue.
When you connect with any client, telnet for example, and simply type one letter the packet gets sent and since its the wrong format for SFML the client locks up on
if (client.receive(packet) == sf::Socket::Done)
I know I can receive into a byte array instead of directly into a packet, but I wanted to use this method to deal with packet fragmentation (When I tested it without SFML the server is sending packets over TCP and splitting them randomly and breaking things).
I cannot have a potential connection block the whole server because they send a little invalid data.
Any advice would be great.
Best Regards.