Results 1 to 3 of 3

Thread: Winsock [VB6] - Changing Open Socket ID?

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2005
    Posts
    2

    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:
    1. Private Sub Form_Load()
    2. webBrowser.Navigate "<Removed for anti-advertising purposes>"
    3. Winsock1.RemoteHost = "62.27.32.29"
    4. Winsock1.RemotePort = 8080
    5. Winsock1.Connect
    6. End Sub

    Is there a function that I can add to this that changes the Open Socket ID of the connection? Thanks in advance.

  2. #2
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: Winsock [VB6] - Changing Open Socket ID?

    Code:
    winsock1.localport = 2199

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2005
    Posts
    2

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width