Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: K0D3R on May 30, 2003, 12:07 AM

Title: Connecting to Bnet?
Post by: K0D3R on May 30, 2003, 12:07 AM
I'm looking for a simple way to connect and disconnect from bnet right now. Since this is the only GOOD forum i know of to get some programming help, i thought i'd ask  =)
Title: Re:Connecting to Bnet?
Post by: Noodlez on May 30, 2003, 12:39 AM

To connect (in VB, which I assume your using for the obvious reasons) Winsock.Connect "uswest.battle.net", 6112
To disconnect
Winsock.Close
Title: Re:Connecting to Bnet?
Post by: K0D3R on May 30, 2003, 04:16 PM
nahh, i thought i put VC++ in the title, but i guess i didn't....
Title: Re:Connecting to Bnet?
Post by: Zakath on May 30, 2003, 08:59 PM
connect (BinaryBotSocket, (struct sockaddr *)&sa, sizeof( sa ))
and
closesocket( BinaryBotSocket )
have always worked well for me.
Title: Re:Connecting to Bnet?
Post by: Yoni on May 31, 2003, 12:29 PM
You should shutdown the socket too, to gracefully terminate the connection.
Title: Re:Connecting to Bnet?
Post by: Zakath on May 31, 2003, 04:55 PM
True, but I'm lazy.
Title: Re:Connecting to Bnet?
Post by: Hazard on May 31, 2003, 05:21 PM
Not too lazy to respond to the post pointing out your mistake...

~DrivE~