Reputation: 11
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?
Upvotes: 0
Views: 1036
Reputation: 310840
If client connect() succeeds before the server accept(), how does the client know that server accept() is successful?
By sending a request and succeeding in getting a response.
What happens if send() is called during the time gap between connect() succeeds and server accept(), will there be an error?
No. The data will go into the socket receive buffer at the server.
Upvotes: 1