title: Can a TCP port be re-used before TIME-WAIT expires?
body: <p>We have a C# FTP class which works great but we are running out of TCP ports because they are all in the TIME-WAIT state and cannot be reused. We can decrease the default TIME-WAIT in the registry but we would rather reuse the ports. </p>
  
  <p>So given the blog below:
  <a href="http://blogs.technet.com/b/networking/archive/2010/08/11/how-tcp-time-wait-assassination-works.aspx" rel="nofollow">http://blogs.technet.com/b/networking/archive/2010/08/11/how-tcp-time-wait-assassination-works.aspx</a></p>
  
  <blockquote>
    <p>In a situation where the server side socket goes to a TIME-WAIT state and the client reconnects to the server within 2MSL (default TIME-WAIT time), there are 2 things that can happen:</p>
    
    <p>1.The server will not respond to the SYN packets from the client because the socket is in the TIME-WAIT state. </p>
    
    <p>2.The server may accept the SYN from the client and change the state of the socket from TIME-WAIT to ESTABLISHED. This is known as TIME-WAIT assassination, or incarnation of a previous connection. </p>
    
    <p>The key to scenario ‘2’ above is that the ISN (Initial Sequence number) of the SYN sent needs to be higher than the highest sequence number used in the previous session. If the ISN is not as expected, the server will not respond to the SYN and the socket will wait for 2MSL before being available for use again.</p>
  </blockquote>
  
  <p>I am trying (programmatically in C#) to find a way to always send a SYN sent with a higher number than the highest sequence number used in previous session.</p>
  
  <p>Is that possible to achieve?</p>