Jump to content
  • Advertisement
Sign in to follow this  
phr34k9

Need some help on networking

This topic is 4280 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey all, i found a old script form Mangos/Ludmilla (for those who don't know it they are pirated server software for W0W). The script file is called: BufferByte.h Anyways basicly what it does is a standard class with lots of overload functions, that would check wich type it is and how to write it to a storage array. small example: WorldPacket pkt; uint8 value = 0; uint64 value2 = 1x09; pkt << value; pkt << value2; and it also has the posiblity to read from it's values: WorldPacket pkt2(&pkt); uint8 value3; uint64 value4; pkt2 >> value3; pkr3 >> value4; Now i tested this myself and it works for me but now i have a problem, i want to send over the network contents but it just doesn't work. pkt.contents() should be able to return the contents. (char *)pkt.contents() (char *)&pkt.contents() (char *)&pkt don't work if send these over, ow they will send alright but if i deserialize them i'm getting a access violation error. It's probably a error that i'm sending over a pointers number and since the memory is not shared between them, well u get it. + pluse the fact that if it is a pointer, over network pointers should not exist since client/server are never on the same comp in theory. Here's the pastebin of the files to give you guys a better impression http://pastebin.com/869731 i Would appricate any form of help on this.. so my question is how to make this Bytebuffer.h so that it can you convert it contents so it can be sent trough a socket and deconvert the contents at the other end. (p.s. my excuses for some bad english) aww still no replies =( must have ben harder than it looked. [Edited by - phr34k9 on January 29, 2007 3:03:02 AM]

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!