haha--
haha--

Reputation: 3

After I close the listening socket fd, can I continue to accept connections in the backlog finish queue?

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

Answers (1)

user207421
user207421

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

Related Questions