Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Okee on April 25, 2005, 07:36 PM

Title: [C++] Packet buffer classes for battle.net
Post by: Okee on April 25, 2005, 07:36 PM
Are there any public packet buffer classes out there that I can use? I'm looking for one that handles the sending of the packet as well as constructing/reading packets, similar to DM's old one for visual basic. DM's new DynBuffer doesn't appear to handle the send packet function in the class.

Thanks in advance.

Edit: What's this CPacket class I see several people using in their C++ bots?
Title: Re: [C++] Packet buffer classes for battle.net
Post by: UserLoser. on April 25, 2005, 09:08 PM
Quote from: Okee on April 25, 2005, 07:36 PM
Are there any public packet buffer classes out there that I can use? I'm looking for one that handles the sending of the packet as well as constructing/reading packets, similar to DM's old one for visual basic. DM's new DynBuffer doesn't appear to handle the send packet function in the class.

Thanks in advance.

Edit: What's this CPacket class I see several people using in their C++ bots?

"DynBuffer" is dynamic buffer. It's not used only for outgoing/incoming messages
Title: Re: [C++] Packet buffer classes for battle.net
Post by: Okee on April 26, 2005, 09:36 AM
Quote from: UserLoser on April 25, 2005, 09:08 PM
Quote from: Okee on April 25, 2005, 07:36 PM
Are there any public packet buffer classes out there that I can use? I'm looking for one that handles the sending of the packet as well as constructing/reading packets, similar to DM's old one for visual basic. DM's new DynBuffer doesn't appear to handle the send packet function in the class.

Thanks in advance.

Edit: What's this CPacket class I see several people using in their C++ bots?

"DynBuffer" is dynamic buffer. It's not used only for outgoing/incoming messages

Oh, alright. What's this CPacket I see several posts on this forum using? Know anything about it? Maybe, where I can find it?
Title: Re: [C++] Packet buffer classes for battle.net
Post by: MyndFyre on April 26, 2005, 10:20 AM
Quote from: Okee on April 25, 2005, 07:36 PM
DM's new DynBuffer doesn't appear to handle the send packet function in the class.

Perhaps the buffer class shouldn't handle sending itself?  Sounds like bad OO design to me.
Title: Re: [C++] Packet buffer classes for battle.net
Post by: Okee on April 27, 2005, 06:12 PM
Nobody knows anything about CPacket?
Here's one of the posts talking about it... here. (http://forum.valhallalegends.com/phpbbs/index.php?topic=11381.0)

OnlyMeat, do you know?
Title: Re: [C++] Packet buffer classes for battle.net
Post by: MyndFyre on April 27, 2005, 06:25 PM
Quote from: Okee on April 27, 2005, 06:12 PM
Nobody knows anything about CPacket?

Google knows. (http://wiki.shareaza.com/static/Developers.Code.CPacket)

http://www.google.com/search?hl=en&q=CPacket&btnG=Google+Search
Title: Re: [C++] Packet buffer classes for battle.net
Post by: Yegg on April 27, 2005, 06:36 PM
Google knows all.
Title: Re: [C++] Packet buffer classes for battle.net
Post by: OnlyMeat on April 27, 2005, 07:50 PM
Quote from: Okee on April 27, 2005, 06:12 PM
Nobody knows anything about CPacket?
Here's one of the posts talking about it... here. (http://forum.valhallalegends.com/phpbbs/index.php?topic=11381.0)

OnlyMeat, do you know?

It's just a base class to encapsulate basic packet buffer operations. The '<<' and '>>' shift operators are overloaded to provide c++ stream type functionality for a variety of datatypes.