Valhalla Legends Forums Archive | Battle.net Bot Development | Winsock suggestions?

AuthorMessageTime
TravelToAiur
I'm making an app with several winsocks in it ( each one should be a separate bot that connects to b.net server ). When the first one connects all work fine, when the second asks for connection he get refused and the first winsock connection is closed as well.
Any suggestion?

PS: vb plz ;)
October 17, 2003, 10:44 PM
Spht
[quote author=TravelToAiur link=board=17;threadid=3130;start=0#msg24480 date=1066430676]
I'm making an app with several winsocks in it ( each one should be a separate bot that connects to b.net server ). When the first one connects all work fine, when the second asks for connection he get refused and the first winsock connection is closed as well.
Any suggestion?

PS: vb plz ;)
[/quote]

No suggestions. Is this Visual Basic and are you using the Winsock control? You'll have to paste some related code.
October 17, 2003, 11:11 PM
TravelToAiur
This is meant to be a really basic bot

[code]Private Sub wskBNet_Connect()
wskBnet.SendData Chr(3) & Chr(4) & BotAccount & vbCrLf & BotPass & vbCrLf
End Sub

Private Sub wskBNet2_Connect()
wskBnet2.SendData Chr(3) & Chr(4) & BotAccount2 & vbCrLf & BotPass & vbCrLf
End Sub

Private Sub Form_Load()
wskBnet.RemoteHost = server
wskBnet.RemotePort = botPort
wskBnet.Connect
--> all work fine, data is sent and bot appears online on b.net server
wskBnet2.RemoteHost = server
wskBnet2.RemotePort = botPort
wskBnet2.Connect
--> connection is refused, wskBnet is disconnected as well :(
End Sub[/code]

[Edit: added code tags. In the future, you should use them yourself.]
October 17, 2003, 11:37 PM
hismajesty
Please put (code) and (/code) around your code.

(replace ( and ) with [ and ] )
October 17, 2003, 11:45 PM
St0rm.iD
You can only have 1 connection to CHAT per IP address.
October 18, 2003, 12:50 AM
TravelToAiur
Any way to have more than one?
Use proxies on my app?
Or trying to spoof IP every new connection? Is this possibile in vb?
Thank you
October 18, 2003, 12:36 PM
Bannable
There is a simiple solution to this. For each connection you have to increase the Local Port on each winsock so that it does not match any other local port's already in use. If this is not done, odd things can happen.
October 18, 2003, 12:55 PM
CupHead
First of all, Bannable has no idea what he's talking about.

Secondly, yes, you can use a proxied connection to open more than one connection via CHAT. Spoofing the IP wouldn't do any good because the connection negotiation would be attempted at the IP that you specified, not yours. Other than that, you're stuck using a "binary" connection if you want more than one custom-client on [each gateway].
October 18, 2003, 1:36 PM
Lenny
Wouldnt a control array of winsocks be easier?
October 19, 2003, 12:40 AM

Search