• Welcome to Valhalla Legends Archive.
 

[C++] Anti-Idle methods

Started by Smithsonian, July 17, 2005, 03:55 PM

Previous topic - Next topic

Smithsonian

What's the best method of doing an anti-idle? I've seen people do it several ways.
How would you do it within your MsgLoop? Right now I've got a variable holding how long in second i want it to wait before it sends the message. In my message loop, since it's constantly looping, I was going to have it check to see if that amount of time in seconds has expired or not. The loop though goes extremely fast obviouisly. How do I make it send exactly every X seconds? Or if theres a better method, mind sharing?

Thanks.

Eric

#1
QuoteWhat's the best method of doing an anti-idle?

By responding to SID_PING.

Smithsonian

how often is SID_PING sent?

Eric

#3
Quote from: Smithsonian on July 17, 2005, 04:05 PM
how often is SID_PING sent?

When idled, Battle.net will send it about every 30 seconds and you are expected to reply when it's received.

Tontow

try sending null when you get null

UserLoser.

Quote from: Tontow on July 17, 2005, 06:34 PM
try sending null when you get null

I'm sure that's not what he is asking, and doing that is rather pointless anyways since it's used to test the connection