Author | Message | Time |
---|---|---|
REiGN | Ok say when I get disconnected from battle.net. How would I make more winsocks trying to connect, since im only using one I get around 1 reconnect per second, Im thinking more like 6 per second. This is how it looks right now. Private Sub Winsock_Close() AddChat "Server closed connection" & vbCrLf, vbRed Battlenet.Disconnect Winsock Winsock.Connect End Sub | March 24, 2003, 10:58 PM |
n00blar | I'm not understanding you to well but let me _try_ to help you... [code] Private Sub SocketName_Close() SocketName.Close SocketName.Connect 'assuming all properties required set End Sub [/code][code][/code] | March 25, 2003, 3:53 AM |
REiGN | Like I would want 5 winsocks trying to connect to battle.net at the same time. | March 25, 2003, 8:44 PM |
n00blar | I am not quite sure *why* you would want to do that but there are a couple ways you could do that 1: Add five winsock controls to the form [code] Private Sub Form_Load() 'set properties SocketName1.Connect SocketName2.Connect SocketName3.Connect SocketName4.Connect SocketName5.Connect End Sub [/code] 2: Add one winsock control, goto ites properties, and set an index value [code] Private Sub Form_Load() Dim i as Integer For i = (Index Value you set) + 1 to (Index Value you set) + 4 Load SocketName(i) 'set properties SocketName(i).Connect Next i End Sub [/code] | March 25, 2003, 9:57 PM |
REiGN | So for the frist one would it look like: Private Sub Winsock_Close() AddChat "Server closed connection" & vbCrLf, vbRed Battlenet.Disconnect Winsock Winsock1.Connect Winsock2.Connect Winsock3.Connect Winsock4.Connect End Sub [quote author=n00blar link=board=17;threadid=809;start=0#msg6395 date=1048629452] I am not quite sure *why* you would want to do that but there are a couple ways you could do that 1: Add five winsock controls to the form [code] Private Sub Form_Load() 'set properties SocketName1.Connect SocketName2.Connect SocketName3.Connect SocketName4.Connect SocketName5.Connect End Sub [/code] 2: Add one winsock control, goto ites properties, and set an index value [code] Private Sub Form_Load() Dim i as Integer For i = (Index Value you set) + 1 to (Index Value you set) + 4 Load SocketName(i) 'set properties SocketName(i).Connect Next i End Sub [/code] [quote][/quote] | March 26, 2003, 6:55 AM |
z0rg | y0 REIGN this is {EwR}ZeRG^KoG .. IM me.. ill help u out... AIM: eheads15 | March 26, 2003, 8:55 AM |
Atom | This is a terrible idea. If your having problems reconnecting fast adding more sockets is gonna add to the problem. Not to mention you will have 6 winsocks that will end up connecting. It will probably also end up with an ip ban. I really wouldnt reccomend that. | March 28, 2003, 12:33 AM |
St0rm.iD | Reign: what exactly are you trying to do? | March 28, 2003, 12:34 AM |
Sevatox | Hes trying to make a massload, super reconnect bot for xgn (zorm's warrnet server) :\ EDIT: forgot to mention, you can't get ipbanned unless zorm, avenger, or slash ibpan you | March 28, 2003, 8:34 AM |
Skywing | [quote author=St0rm.iD link=board=17;threadid=809;start=0#msg6527 date=1048811687] Reign: what exactly are you trying to do? [/quote]I'll take a stab in the dark and guess he's trying to reestablish a lost connection faster when the remote host has gone down for a reboot. For whatever reason, I'm guessing he doesn't want to wait around for the TCP SYN messages to be timed out and presumed lost by the OS before it returns failure for a connect event. A better solution might be to offset each connect attempt by say 250ms, and if all connect attempts are in progress after 250ms more rolls around, cancel the oldest request. Naturally, this will make it impossible to connect if your latency to the server is around 1500ms or higher, but I'm also guessing the author isn't too concerned about that. | March 29, 2003, 5:53 AM |