title: Three-Second Delay for Closing Unreachable IP in Windows OS
body: <p><strong><em>PLEASE TEST WITH AN UNREACHABLE IP THAT IS IN YOUR DOMAIN AND WITH WINDOWS OS</em></strong></p>
  
  <hr>
  
  <pre><code>import socket
  import datetime
  
  IPADDR = '192.168.1.141'
  PORTNUM = 5600
  PACKETDATA = "f1a525da11f6".encode()
  
  while(True):
      s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 0)
      #s.connect((IPADDR, PORTNUM))        
      #s.send(PACKETDATA)
      s.sendto(PACKETDATA, (IPADDR, PORTNUM))
      print(datetime.datetime.now())
      s.close()
  </code></pre>
  
  <hr>
  
  <blockquote>
    <p>Windows Socket Close Time for Unreachable IP(with UDP): 3 seconds<br>
     Ubuntu Socket Close Time for  Unreachable  IP(with UDP):   0 Second</p>
  </blockquote>
  
  <p>Just copy and run that codes at above and see results.<br>
  <strong><em>Why I am getting that three-second delay? How to reduce that three-second to the zero?</em></strong></p>