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

Author Topic: How to read an sf::Packet twice  (Read 1828 times)

0 Members and 1 Guest are viewing this topic.

Vaclav

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
How to read an sf::Packet twice
« on: September 06, 2013, 03:36:00 pm »
Hey,
I want to read an sf::Packet instance two times. I do not want to copy it and read the other instance for the second time.
I looked at the API: http://sfml-dev.org/documentation/2.1/classsf_1_1Packet.php
And I didn't find anything like rewind. So this isn't possible, is it?
If I try to read it when I reached the packet's end, it goes to an error state, and doesn't rewind, does it?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: How to read an sf::Packet twice
« Reply #1 on: September 06, 2013, 06:18:34 pm »
You're right, there's no way to rewind a packet.
Laurent Gomila - SFML developer