Jump to content

Hello world/Web server: Difference between revisions

m
Line 235:
<lang j>hello''</lang>
 
This version works because reasonable http requests fit in a single tcp packet. (And note that the server waits for one tcp packet before responding.) If parsing of the request is desired, one of the more complicated implementations at [[j:JWebServer]] should be used instead (but that's not really relevant for this task, except perhaps to require complete headers before responding, with broken browsers which send multiple tcp packets for the request).
This version works because reasonable http requests fit in a single tcp packet.
 
=={{header|Java}}==
6,962

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.