I have a Problem with Receiving directly after making a connection.
The Data I receive is not broken, but there are 4 Byte Data before my sent Data...
Client-Side Code:
NetPacket.Append( &iBuild, sizeof(sf::Uint32) );
NetPacket.Append( &LocalInfo, sizeof(s_InfoPlayer) );
m_Socket.Send( NetPacket );
Server-Side Code:
That works:
if (m_Client.Receive( (char*)&SomeData, sizeof(sf::Uint32), iCount) != sf::Socket::Done) { return; }
if (m_Client.Receive( (char*)&iBuild, sizeof(sf::Uint32), iCount) != sf::Socket::Done) { return; }
if (m_Client.Receive( (char*)&PlayerInfo, sizeof(s_InfoPlayer), iCount) != sf::Socket::Done) { return; }
That dont works:
if (m_Client.Receive( (char*)&iBuild, sizeof(sf::Uint32), iCount) != sf::Socket::Done) { return; }
if (m_Client.Receive( (char*)&PlayerInfo, sizeof(s_InfoPlayer), iCount) != sf::Socket::Done) { return; }
Greetings