Winsock [VB6] - Changing Open Socket ID?
Hi, I am a bit new to Visual Basic 6 and this forum. I was wondering if anyone can answer my question. Sorry if it has already been posted..
I want to create a program in VB6 that sends data to an IP Address. The only problem I have with this is that the data doesn't send correctly, and the server does not respond. After experimenting, I figured out that this is because the Open Socket ID used to send the data. In order to fix this problem, the current ID needs to be changed to the server's Open Socket ID. (For example, the program would send with 1260, when it should be 2199)
Here is the code I am using to connect to the server:
VB Code:
Private Sub Form_Load()
webBrowser.Navigate "<Removed for anti-advertising purposes>"
Winsock1.RemoteHost = "62.27.32.29"
Winsock1.RemotePort = 8080
Winsock1.Connect
End Sub
Is there a function that I can add to this that changes the Open Socket ID of the connection? Thanks in advance.
Re: Winsock [VB6] - Changing Open Socket ID?
Code:
winsock1.localport = 2199
Re: Winsock [VB6] - Changing Open Socket ID?
Quote:
Originally Posted by |2eM!x
Code:
winsock1.localport = 2199
Unfortunately, that will not work because the Server's Socket ID is different every time, and 2199 was only an example. I don't think this is a port problem, either.