I have an application which updates itself through a TCP connection to a server application. This works perfectly fine, except for one specific packet transmission, in which the packet is somehow changed. The server sends a packet containing the number 1:
pack << sf::Uint8(1);
ClientSocket.Send(pack);
(Where `pack` is of type sf::Packet and `ClientSocket` is of type sf::SocketTCP)
Stepping through with my debugger does in fact confirm that these lines are executed, and that the next Receive call in my client is the next few lines:
sock.Receive(pack);
sf::Uint8 conf;
pack >> conf;
(Where `pack` is once again an sf::Packet, and `sock` is a SocketTCP)
However, somehow in my client, conf is showing up as having a value of zero (my debugger confirms this) and it acts as so (the next line switches depending on the value). I am running both applications on the same machine, and they are both reading each other as "127.0.0.1", so the packets (if I understand correctly) aren't going through my router, or really ever leaving my machine. Any ideas on why my packets are being corrupted?