Valhalla Legends Forums Archive | Battle.net Bot Development | Anti-idles (Battle.net)

AuthorMessageTime
Lenny
Will battle.net disconnect a user if nothing is sent from the bot?

If so, is there an actual anti-idle packet for battle.net or can it be any sort of channel packet?

And how often must it be sent?
January 3, 2004, 5:09 AM
Gangz
There is no idle kick for bnet. I have had my bots on for over 2 weeks now with no idles.
January 3, 2004, 5:10 AM
Spht
[quote author=Lenny link=board=17;threadid=4572;start=0#msg38130 date=1073106546]
Will battle.net disconnect a user if nothing is sent from the bot?
[/quote]

No. However, if you don't send anything when idle, it's possible for your application to sometimes not detect connection failures. So you should send something to Battle.net (maybe SID_NULL) if the connection has been idle for a couple minutes to enable the TCP layer to detect connection failures and report them to your application, so you can act on it (reconnect or something).
January 3, 2004, 5:35 AM
hismajesty
I beleive 0x00 should be sent every ~2 minutes. I know that if I don't send it within about 4 minutes apart at least, I'll disconnect. However, if you send it too fast (every millisecond even) you'll disconnect too. :P
January 3, 2004, 11:43 AM
Gangz
I guess it depends on how your bot is written. Mine checks for open winsock connections every 5 minutes.
January 3, 2004, 5:40 PM
Skywing
IIRC, battle.snp sends SID_NULL at semiregular intervals. Some broken battle.net emulation servers (e.g. FSGS) will disconnect client that do not do this.
January 3, 2004, 6:16 PM
Kp
Also, if your connection is idle too long, battle.net will send you a SID_PING. Failure to answer enough of these will get you dropped. I haven't tested whether SID_PING can be ignored in preference of sending more meaningful traffic (that is, whether the server wants a pong or just wants you to send anything at all).
January 3, 2004, 6:23 PM
MesiaH
you can ignore SID_PING...

Depending on what type of bot you are creating, but i have found my bot to be most stable, by adding support for just about every "connection" packet there is, ad banner requests are also a nice little way to stay alive..
January 3, 2004, 9:03 PM
Skywing
Note that because the ad server tends to die, it's a bad idea to rely on ad banners to detect a dead connection.
January 3, 2004, 9:05 PM
UserLoser.
I try to do almost exactly what the client does, when it does it too - I have never gotten disconnected for being idle
January 3, 2004, 9:06 PM
Lenny
[quote author=Kp link=board=17;threadid=4572;start=0#msg38197 date=1073154194]
Also, if your connection is idle too long, battle.net will send you a SID_PING. Failure to answer enough of these will get you dropped. I haven't tested whether SID_PING can be ignored in preference of sending more meaningful traffic (that is, whether the server wants a pong or just wants you to send anything at all).
[/quote]

I've tested by ignoring the SID_PING and sending text messages at given intervals, battle.net just seems to want the client to send anything at all...
January 4, 2004, 3:26 AM

Search