sf::Packet is only meant to be used with sf::Packet. Mixing sf::Packet with any other protocol (yes... telnet is a protocol) will yield undefined behaviour. Don't do it. Either use sf::Packet on both ends or don't use it at all.
If you are feeling brave, you can implement the sf::Packet protocol in whatever other client you want and you can use that to communicate with an SFML application using sf::Packet, but why bother if you can directly use sf::Packet there as well anyway...
And just so you know, the examples weren't written with a real world scenario in mind. They are just there to demonstrate the capabilities of a certain class. They are not secure, don't perform any sanity checks and probably are also very inefficient at what they do. If you are planning on using sf::SocketSelector or sf::Packet or sf::TcpSocket, don't copy and paste from the examples...