Writing to a closed, local TCP socket not failing

后端 未结 5 1135
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-29 21:10

I seem to be having a problem with my sockets. Below, you will see some code which forks a server and a client. The server opens a TCP socket, and the client connects to i

5条回答
  •  忘掉有多难
    2020-11-29 22:00

    I suspect that what's happening is the server side socket is still valid so your write call is making a valid attempt at writing to your file descriptor even though your TCP session is in a closed state. If I am completely wrong let me know.

提交回复
热议问题