TIME_WAIT is the final state of a closed socket, which is kept around by the OS. The length of time it is kept in this state depends upon the OS, and Windows hangs on to them longer than most. This can be a problem on system with a high number of connections, as you can effectively run out of sockets if you exhaust the dynamic port allocation space within the 4 minute period.
If you want to reduce the time a socket is in TIME_WAIT on Windows, you'll need to make a change to the registry.
At the following location:
Set TCPTimedWaitDelay to 30 or 60 (seconds). If the key doesn't exist, simply add it. Of course, you'll need to reboot for this to take effect.