• Welcome to Valhalla Legends Archive.
 

Partially Recived Packets and DataArrival

Started by Lenny, December 03, 2003, 03:00 PM

Previous topic - Next topic

Lenny

After I added proxy support to my program (to run more than 8 bots), Ive been recieving partial packets from battle.net.

Ive fixed this problem by placing this into my dataarrival:

On Error Goto lngWait
lngWait:
      Exit Sub

and making strBuffer an array for each bot....
But I dont like these quick debug fixes, I prefer to solve the problem rather than going around it.

Do socks proxies send partial packets more frequently?

I believe this fix only works because my program exits the sub when it recieves a partial packet (hence, an error occurs) and waits for rest of the packet to arrive.

I can see that my lngLen is returning negative values.  Is there anyone that has a more practical fix?

[Visual Basic]
The Bovine Revolution
Something unimportant

Live Battle.net:

WARNING: The preceding message may have contained content unsuitable for young children.

Kp

Quote from: Lenny on December 03, 2003, 03:00 PM
Is there anyone that has a more practical fix?

Yes.  Stop loading so many bots.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

MyndFyre

Aside from running 8 bots, this post has nothing to do with Battle.net programming.  It belongs on the VB or General Programming forum.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Lenny

#3
Well, bot developers would have the most use for this and bot developers would have the highest probability of having the solution to this problem

Well, I'de rather load so many bots than avoid the problem completely.
The Bovine Revolution
Something unimportant

Live Battle.net:

WARNING: The preceding message may have contained content unsuitable for young children.

MyndFyre

Quote from: Lenny on December 03, 2003, 03:34 PM
Well, bot developers would have the most use for this and bot developers would have the highest probability of having the solution to this problem

Well, I'de(sic) rather load so many bots than avoid the problem completely.

I hardly see that this has nearly any relevance to bot development unless you're trying to develop a loader bot.  I also think that a general internet programmer, particularly one who has developed a proxy server or firewall for general use, would be more likely to have the solution than bot programmers.  Not everybody sees a lot of use in loading a channel.

If you're looking for sample proxy server code, a quick Google search for "proxy server development" returned the following link within the first 10 hits:

http://www.programmersheaven.com/zone14/cat767/

It might just help you find what you're looking for.  Notice that it's at Programmers Heaven.com, not The Disclaimer (botdev.valhallalegends.com).
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Kp

Quote from: Lenny on December 03, 2003, 03:34 PM
Well, I'de rather load so many bots than avoid the problem completely.

What use could you possibly have for so many bots?
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Lenny

Well, I just wanted to try something new, loading multiple bots seemed like an interesting idea.
The Bovine Revolution
Something unimportant

Live Battle.net:

WARNING: The preceding message may have contained content unsuitable for young children.

Kp

Quote from: Lenny on December 03, 2003, 05:19 PM
Well, I just wanted to try something new, loading multiple bots seemed like an interesting idea.

You can get quite a few without any proxies, and barring a good use for them, there's really no reason to tie up (or even have) that many cdkeys.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

SiMi

    Yes, Lenny I know what your talking about it. I hate it when that happens it delays a lot and uses a lot of memory on the bot. I had the same problem with my bot which also loaded multiple amount of usernames onto battle.net.  It also seems like i get partial amount of data, a lot of the time it disconnects to unknown errors.
   I tried debugging it a lot back then but I also forgot a lot because it was a long time ago. Try loading them for one different winsock all at once and send the data to the other bots. Thats my only suggestion for you.

Banana fanna fo fanna

Ew why was my post deleted? Was perfectly helpful...

Lenny

#10
Sadly, I never got to read the post either...

I'm still trying to find a better way to solve the partial packet problem than the one I posted above.

Also, besides recieving partial packets, does battle.net ever not send the &HFF header?  People say it happens occansionaly and other than that the rest of the packet is fine.
The Bovine Revolution
Something unimportant

Live Battle.net:

WARNING: The preceding message may have contained content unsuitable for young children.

MyndFyre

I have received packets without the 0xff header; however, my bot disregards them.  I don't even bother trying to decode them; if that means a lost chat message, oh well.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Kp

Quote from: Myndfyre on December 04, 2003, 04:42 PM
I have received packets without the 0xff header; however, my bot disregards them.  I don't even bother trying to decode them; if that means a lost chat message, oh well.

Under what circumstances did this happen?  I have a client parked in the vL channel most of every day and don't recall ever receiving a damaged BNCS packet.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

MyndFyre

On packetlogs, I've received data from BNCS that didn't have the 0xff header.

That isn't to say that the Socket didn't assemble it correctly before it got to me or anything of the sort.  However, I can recall at least three instances where I was baffled because Ethereal said the data I got from a BNCS server did not begin with 0xff.

(okay it didn't "say" it - it displayed it).
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Skywing

Quote from: Myndfyre on December 04, 2003, 06:09 PM
On packetlogs, I've received data from BNCS that didn't have the 0xff header.

That isn't to say that the Socket didn't assemble it correctly before it got to me or anything of the sort.  However, I can recall at least three instances where I was baffled because Ethereal said the data I got from a BNCS server did not begin with 0xff.

(okay it didn't "say" it - it displayed it).
It sounds like the data got split into more than one TCP packet.  This is normal, as TCP is a stream protocol.