copy packet data to another packet using SFML in c++ -
can tell me how copy sfml data of sf::packet
instance (e.g. packet1
) instance (e.g. packet2
)?
i know how packet data problem cannot set packet2's data. mean:
sf::packet packet; // compressing variable sf::packet packet2; // compressing variable2 const void* get1 = packet.getdata(); // data of above packet variable packet2 << get1; // did not worked
the problem cannot bring packet1
's data packet2
. i've tried far did not work!
all replies appreciated, , thanks.
never used sfml, reading sfml documentation, expect:
const void* get1 = packet.getdata(); size_t len = packet.getdatasize(); packet2.append(get1, len);
Comments
Post a Comment