Sockets: Non-blocking shutdown(SHUT_WR)?

痴心易碎 提交于 2019-12-12 03:43:57

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!