如果客户端connect()先于服务端accept()成功,那么客户端如何知道服务端accept()成功呢? 如果在 connect() 成功和服务器 accept() 之间的时间间隔调用 send() 会发生什么情况,会出现错误吗?
最佳答案
If client connect() succeeds before the server accept(), how does the client know that server accept() is successful?
通过发送请求并成功获得响应。
What happens if send() is called during the time gap between connect() succeeds and server accept(), will there be an error?
没有。数据将进入服务器的套接字接收缓冲区。
关于linux - client connect()先于server accept()成功,client如何知道server accept()成功呢?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24727828/