1
Network / Using Packet with SocketTCP
« on: May 15, 2010, 05:58:51 pm »
I would like to receive emails from POP3 server. SocketTCP's function Receive can only be used with char* argument and that works, but some fields in header and text are encoded(utf-8 etc). I've read that sf::Packet could get wstring data so I tried to used it, but I have a problem.
Receive function return sf::Socket::Disconnected and object of class Packet is empty, although myPendingPacket contains all data(with sequence '.\r\n' at the end). myPendingPacketSize is -1.
I used sockets in blocking mode.
Is it a good way to get data as wide characters? If yes, why SocketTCP doesn't fill Packet object ?
Receive function return sf::Socket::Disconnected and object of class Packet is empty, although myPendingPacket contains all data(with sequence '.\r\n' at the end). myPendingPacketSize is -1.
I used sockets in blocking mode.
Is it a good way to get data as wide characters? If yes, why SocketTCP doesn't fill Packet object ?