Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Endianness of sf::Packet  (Read 2102 times)

0 Members and 1 Guest are viewing this topic.

netrick

  • Full Member
  • ***
  • Posts: 174
    • View Profile
Endianness of sf::Packet
« 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Endianness of sf::Packet
« Reply #1 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.
Laurent Gomila - SFML developer

 

anything