|
-
Nov 7th, 2005, 08:12 PM
#1
Thread Starter
New Member
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.
-
Nov 7th, 2005, 09:50 PM
#2
Re: Winsock [VB6] - Changing Open Socket ID?
Code:
winsock1.localport = 2199
-
Nov 9th, 2005, 10:59 PM
#3
Thread Starter
New Member
Re: Winsock [VB6] - Changing Open Socket ID?
 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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|