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

Author Topic: Packet.SetReadPos()  (Read 25564 times)

0 Members and 3 Guests are viewing this topic.

tgm

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
Packet.SetReadPos()
« on: June 16, 2008, 10:37:15 pm »
would you mind adding something like
Packet.SetReadPos()
Packet.GetReadPos()

That would certainly make some things easier ... (and it doesnt require more than 5 lines of code.)
thx in advance

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Packet.SetReadPos()
« Reply #1 on: June 17, 2008, 03:15:34 am »
Yep, I can add them.

What would you use them for ?
Laurent Gomila - SFML developer

tgm

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
Packet.SetReadPos()
« Reply #2 on: June 17, 2008, 03:40:17 pm »
Well, I'm implementing some encryption layer protkol mixup...
got some problems, when I need to read the first 4 bytes multiple times...
drove me crazy yesterday.. (may it be, GetData() returns the pointer to data+myReadPos??)
I guess its my fault, since it did work... some time the day before yesterday -_-
not sure.. anyway.. stumbled over this nice thingy, and there certainly are some situations when you gonna need this one.
I would code that myself (won't take longer but 5mins) but honestly I already did change a bunch of things, and applying all this changes over and over again, every time you change something about one of the files is quite annoying ;)
greetz

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Packet.SetReadPos()
« Reply #3 on: June 17, 2008, 05:03:15 pm »
Well, you don't need to modify SFML for such simple changes. Just use external non-member functions.

Anyway, maybe I'll add these functions soon ;)
Laurent Gomila - SFML developer

tgm

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
Packet.SetReadPos()
« Reply #4 on: June 17, 2008, 06:57:14 pm »
I'd love to but myReadPois ist private ;)