SFML community forums

Help => Network => Topic started by: netrick on July 22, 2013, 09:43:29 pm

Title: Endianness of sf::Packet
Post by: netrick on July 22, 2013, 09:43:29 pm
What is the endianness used by sf::Packet? I want to communicate with server written in other language (client is C++ SFML) and I need to know which endianness I must use on the server when receiving and sending data.
Title: Re: Endianness of sf::Packet
Post by: Laurent on July 22, 2013, 10:50:26 pm
You need to know not only the endianness, but the whole protocol used by sf::Packet (how it encapsulates the data, and how it encodes non-primitive types). It is generally disadvised to use sf::Packet on one side of the communication only; this protocol is an internal detail and may change in a future minor version.

If you really need to do that, you should read the source code.