Reputation: 3
I need to make the server close gracefully recently on Linux. I met some question.
After I close the listen socket fd, can I recv and send data with already accepted fd?
can I continue accpet connection in the backlog finish queue?
Upvotes: 0
Views: 658
Reputation: 311018
can I recv and send data with already accepted fd?
Yes.
can I continue accpet connection in the backlog finish queue?
No. The listening socket is closed, the backlog queue has been destroyed, the pending connections have been refused, and all further operations on the socket are invalid.
Upvotes: 1