Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Slippin on June 05, 2006, 09:18 PM

Title: More Than One Of the Same Packets
Post by: Slippin on June 05, 2006, 09:18 PM
Short and Simple.
I have an index'd Winsock, Eveything works fine, Logs on bnet, bla bla bla.  But for some reason, I sometimes Get The same packet twice... Any reason for this?
Title: Re: More Than One Of the Same Packets
Post by: FrostWraith on June 05, 2006, 09:53 PM
Is this verified if you don't attempt to parse the packets, just display?
Title: Re: More Than One Of the Same Packets
Post by: Slippin on June 06, 2006, 01:12 AM
Well I do Both, For example, I get the packet that tells you your "True" Username the one that tells you #2 bla bla, I get that packet 3 times or more each Connection.
Title: Re: More Than One Of the Same Packets
Post by: Hdx on June 06, 2006, 01:22 AM
Post a log. Use Etherial/WPE
~-~(HDX)~-~
Title: Re: More Than One Of the Same Packets
Post by: Ringo on June 06, 2006, 04:41 AM
Remove the packet from your buffer into a string.
Cut the packet out from the buffer
Parse the packet you stored in the string.
That way, when the program is still parseing the data, a fresh DataArrival event wont trigger the same packet to be pushed into the parser, because it was cut out before you started to parse the current, so it will just trigger the next packet to be parsed
Title: Re: More Than One Of the Same Packets
Post by: l2k-Shadow on June 11, 2006, 03:30 PM
Seems like you are stacking packets from all winsocks into 1 buffer, use a seperate buffer for each connection.