Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 938665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:40:47+00:00 2026-05-15T21:40:47+00:00

I’m updating legacy code written in VB6 using Winsock controls. Essentially, I’m trying to

  • 0

I’m updating legacy code written in VB6 using Winsock controls. Essentially, I’m trying to connect 4 computers across a local network such that the computers can share files between each other when needed. Originally, once a connection was established, they held onto them indefinitely. These would error after 12-24 hours, however, and couldn’t be reestablished.

To make matters worse, the entire network is wrapped in tight security, and we only have a set number of ports to work with (their firewall blocks all other ports.) I suspect the network security is responsible for closing connections that have been inactive for too long, and are the cause of our instability (our tests here ran indefinitely and reestablished themselves if we rebooted any of the computers.)

My thought is to only establish connections on demand, when a file needs to be sent, to avoid this possibility. The problem I run into is that you cannot connect through the same port for four minutes. So no more than one file can be sent in a four minute window (unless you have all the files at once, but they’re generated at different times.) Using three ports allow three files to be sent at once (one to each peer) but then I’m locked down for four more minutes. I could keep adding ports, but this seems inelegant at best, and will not be allowed by their IT department, at worst.

Any ideas? I can’t find any other socket controls for VB6 that allow reusable bound ports.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T21:40:48+00:00Added an answer on May 15, 2026 at 9:40 pm

    The “four minute delay” is per connection, where a TCP connection is the 4-tuple consisting of the local IP, local port #, remote IP, and remote port #.

    This is normally only an issue for a client that tries to establish a connection to a server using the same localport value repeatedly. For the Winsock control you might try simply setting LocalPort to 0 before attempting each new connection to the remote server.

    Another way that might avoid connections sitting in TIME-WAIT is to be sure to actively CLOSE the connection when the CLOSE event is raised by the other end.

    Using 3 ports to send 3 files seems a little odd. I wouldn’t think this gains you any performance over sending the 3 files one after another using a single connection.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.