T
T
tester_toster2017-11-13 13:34:09
Web servers
tester_toster, 2017-11-13 13:34:09

How does the http server handle concurrent connections from a single client?

Good afternoon. I am writing a simple http server in order to improve my skills.
There was a question:
The server works in a non-blocking mode.
I make a request through the address bar of the form: site / param in one browser tab, and at the same time in the second.
The listening socket does not see the new connection in accept from the second tab until the connection is processed in the first tab. But if you make a site / param
request in one tab , and site / param / value in the second, then the second connection appears before the end of processing the first one. Is this how it's supposed to happen, or do you need some specific socket options set?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2017-11-23
@Demanoidos

Does the connection really take place? Listen with a sniffer on the computer with the server, whether the data is coming or not. The connection can be cut by different software, there are caching proxies, there can be many nuances.
This is provided that you have not screwed up in your code.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question