1. what does "close wait" means?
2. what does "fin_wait2" means?

i understand that these are socket status but
- what do they mean? the socket is waiting for server? the socket is shutting down but waiting for certain event to happen before it's allowed to shutdown?
- what situations causes them?
- it seems that the socket is waiting for something, how can i stop the close wait/fin_wait2 and shutdown the socket? (gracefully or forcefully)

it seems that sockets on "close wait" and "fin_wait2" on my program are the ones with problems

please advise