Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Christ on July 26, 2003, 08:01 PM

Title: More connections at once..
Post by: Christ on July 26, 2003, 08:01 PM
Hello, i dunno if this has been stated before or not, but i didn't quite get all the info i need so if someone would try to help it would be greatly appciated =)

If bnet disconnected me, and i wanted to reconnect faster then then the 1 winsock reconnecting i'd like to get something like 5 or 6 going, so if the code looked like this is there any error in it.
Private Sub Form_Load()
   'set properties
   SocketName1.Connect
   SocketName2.Connect
   SocketName3.Connect
   SocketName4.Connect
   SocketName5.Connect
End Sub
its in VB of course, and if anyone can give an idea on something i said thx.
Title: Re:More connections at once..
Post by: CrAz3D on July 26, 2003, 10:43 PM
Connecting more than one winsock would accomplish nothing.  It would just start multiple connections to BNET.
Title: Re:More connections at once..
Post by: DeviL on July 27, 2003, 11:35 AM
maybe he needs to connect as fast as possible to another server other than bnet, ei: Warrnet/XGN/PvPGN
Title: Re:More connections at once..
Post by: Grok on July 27, 2003, 11:48 AM
Quote from: DeviL on July 27, 2003, 11:35 AM
maybe he needs to connect as fast as possible to another server other than bnet, ei: Warrnet/XGN/PvPGN

In which case, this is the wrong forum.
Title: Re:More connections at once..
Post by: FuZe on July 27, 2003, 08:34 PM
Quote from: Christ on July 26, 2003, 08:01 PM
Hello, i dunno if this has been stated before or not, but i didn't quite get all the info i need so if someone would try to help it would be greatly appciated =)

If bnet disconnected me, and i wanted to reconnect faster then then the 1 winsock reconnecting i'd like to get something like 5 or 6 going, so if the code looked like this is there any error in it.
Private Sub Form_Load()
   'set properties
   SocketName1.Connect
   SocketName2.Connect
   SocketName3.Connect
   SocketName4.Connect
   SocketName5.Connect
End Sub
its in VB of course, and if anyone can give an idea on something i said thx.

Why is it in Form_Load shoudlnt it be in winsock_close() or something
Title: Re:More connections at once..
Post by: Adron on July 28, 2003, 12:57 PM
Note that connecting 5 sockets in parallell might cause the first connection to complete later than if you had connected only one socket.
Title: Re:More connections at once..
Post by: Camel on July 28, 2003, 03:58 PM
Quote from: Adron on July 28, 2003, 12:57 PM
Note that connecting 5 sockets in parallell might cause the first connection to complete later than if you had connected only one socket.

Not to mention the ipbans...
Title: Re:More connections at once..
Post by: Adron on July 28, 2003, 04:00 PM
What's the condition for ipban on multiconnect? Shouldn't you be allowed to connect 8 at once?
Title: Re:More connections at once..
Post by: Camel on July 28, 2003, 04:10 PM
Quote from: Adron on July 28, 2003, 04:00 PM
What's the condition for ipban on multiconnect? Shouldn't you be allowed to connect 8 at once?

Yes, but if one tries to connect them all at the same time battle.net will ipban for hammering.

[edit] BTW, this can be avoided by connecting twice to each of the four servers.
Title: Re:More connections at once..
Post by: Adron on July 28, 2003, 04:14 PM
Ah... OK. So, you'll have to connect to all different servers on a realm. That would make more sense to speed up the connect too - if one server is temporarily down you'll get onto the first one to respond. Much more sense than sending 8 syn's to the same server.
Title: Re:More connections at once..
Post by: Skywing on July 29, 2003, 12:03 AM
Quote from: Adron on July 28, 2003, 04:14 PM
Ah... OK. So, you'll have to connect to all different servers on a realm. That would make more sense to speed up the connect too - if one server is temporarily down you'll get onto the first one to respond. Much more sense than sending 8 syn's to the same server.
Additionally, you could try staggering the connect requests, such that you make a new request every X ms or so up to a maximum of N pending requests, in case you don't like the long retransmit time for the default connect implementation (this would only really apply to situations where the connection is lost due to the entire server machine going down, or perhaps routing difficulties where previous SYNs might have been dropped and the sockets provider is taking a long time to notice).