问题
Is there a way to do shutdown(SHUT_WR) on socket asynchronously?
I.e. start the operation, then wait for its completion using poll?
回答1:
It's asynchronous anyway. It just queues a FIN behind the current contents of the socket send buffer, if any, which really just amounts to setting a bit somewhere. There's no poll()
operation for completion of any send, let alone this one.
来源:https://stackoverflow.com/questions/42343331/sockets-non-blocking-shutdownshut-wr