How to immediately free up the local port used by a recently closed TCPServer component
IPWorks components do not have direct control over when the system releases a port. When an IPWorks component closes a TCP connection, the component tells the operating system to unbind from any bound sockets (connections). In the case of a graceful disconnection, that operating system call immediately returns, but it may be some time before the port is ready to bind again. In the case of an immediate disconnection, the operating system call immediately returns, and the port is immediately ready to bind again.
In order for IPWorks components that utilize TCP to immediately disconnect, the Linger property will need to be set to false. This will ensure that the port will be ready immediately after the IPWorks component closes a TCP connection.
We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at firstname.lastname@example.org.