Results 1 to 7 of 7

Thread: address in use?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2003
    Posts
    601

    address in use?

    says address in use? Don't really understand.

    frmFileTransfers.Winsock1(frmFileTransfers.Winsock1.Count - 1).Connect IPAddress, 9106

    EDIT: attached the project.
    error acurses in frmFileAcceptDialoge in the Accept button.
    Last edited by psychotomus; Aug 5th, 2007 at 01:51 PM.

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2003
    Posts
    601

    Re: address in use?

    forgot project
    Attached Files Attached Files

  3. #3
    Lively Member
    Join Date
    Feb 2007
    Posts
    65

    Re: address in use?

    Try another port

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2003
    Posts
    601

    Re: address in use?

    changing the port doesn't work.

  5. #5
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: address in use?

    Wild guess:

    This Winsock control is being reused a second time, and ultimately a third time, etc. Its LocalPort property is not being reset to zero (0) before re-using it, i.e. Connect being called again.

    A Winsock "address" consists of the protocol (TCP vs. UDP), local port number, and local IP address taken together in this context. Using a LocalPort of 0 tells Winsock to allocate a free ephemeral port and assign it for you. It's a bit like using FreeFile() to allocate a file number for VB native I/O operations.
    Last edited by dilettante; Aug 15th, 2007 at 09:31 AM.

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2003
    Posts
    601

    Re: address in use?

    so change localport to 0 then set it to whatever i want to set it to?

  7. #7
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: address in use?

    Set LocalPort to 0 before doing each Connect.

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