|
-
Sep 21st, 2007, 12:30 AM
#1
Thread Starter
Lively Member
Winsock: How to receive data when you cant bind to a port?
Im using a winsock control in my application to read data that comes in on a specific IP. The remote IP is static, as is the remote port. However, it binds to a different local port every time. Is there a way to 'override' this issue? Is there a way in VB6 to allow the incoming data to randomly select the portit wants, and then have the application bind to it?
Im using the following code, but the 'Bind' value cannot be predefined. Is there a way I could allow the application to randomize the choice of local ports? Sometimes it connects to port 1045, sometimes 1046, or 1048 etc.
With Winsock1
.RemoteHost = "xxx.xxx.xxx.xxx"
.RemotePort = 1809
.Bind 1045
End With
Thanks
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
|