TCP port states generally there are several, we can iis7 server monitoring tools to detect the current state:
1, LISTENING status
after the first start FTP service is listening (LISTENING) status.
2, ESTABLISHED condition
ESTABLISHED means to establish sustained. Revealed two machines are communicating.
3, CLOSE_WAIT
other ongoing or closed automatically lead to a sustained network anomaly interrupt, then our situation will become CLOSE_WAIT At this point we want to divert close () to enable continuous closed properly.
4, TIME_WAIT
automatically divert close () off continued, the other after receiving confirmation status becomes TIME_WAIT. TCP protocol delineation TIME_WAIT situation will continue until 2MSL (ie twice the livelihood of a very large segment), in order to ensure the continued situation will not affect the old to the new continuous occurrence. Continued occupation of the resources in the TIME_WAIT status will not be released kernel, as a server, where possible, try not to disconnect automatically continue to reduce resource extravagant TIME_WAIT status caused.
Currently there is a method to avoid lavish TIME_WAIT resources that are closed socket of LINGER options. But this approach is not recommended TCP protocol, in some cases, this operation may lead to unknown errors.