Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: thecableguy159 on March 12, 2004, 08:14 PM

Title: BNLS Error?
Post by: thecableguy159 on March 12, 2004, 08:14 PM
I'm using CSB with VB (yeah, I'm a noob), and have successfully connected to BNLS and Bnet several times. But after a varying, but brief, period of time, I always get disconnected from BNLS. As far as I can tell, there's nothing wrong with the code, any ideas about what might be wrong?
Title: Re:BNLS Error?
Post by: MyndFyre on March 12, 2004, 08:15 PM
After you log on to Battle.net, you can disconnect from BNLS.  As far as I can tell, you don't need the connection open at all, except for a few special things (like changing passwords).

On the other hand, if you really, really want to keep it open, send the idle message BNLS_NULL every short period of time.  My Battle.net idle packet is once every five minutes, and I'd imagine that BNLS might be a little shorter.

I don't ever use it though.

[edit] I just realized you're using CSB.  I'm not sure how CSB works, but I imagine it would disconnect from BNLS just cuz it's supposed to.  I am not sure if you need to or are able to send packets through it directly, but again - BNLS_NULL is the keep-alive packet, documented in the BNLS protocol spec. [/edit]
Title: Re:BNLS Error?
Post by: thecableguy159 on March 12, 2004, 08:31 PM
I wouldn't care about keeping it open if it were only useful for specialized functions, but whenever it disconnects from BNLS, it also disconnects from Bnet, but doesn't show it. So should I go with the BNLS_NULL idea?
Title: Re:BNLS Error?
Post by: Skywing on March 12, 2004, 09:02 PM
It shouldn't disconnect from Battle.net after disconnecting from BNLS if you are finished logging on.

There is no need to maintain the BNLS connection long-term after that.
Title: Re:BNLS Error?
Post by: Stealth on March 13, 2004, 03:52 AM
Are you disconnecting from Battle.net in your BNLSDisconnected() event?