How a server can write "Hello" to a browser ?
I have simple server that is listening to port 5000. The server is running normally and when a browser sends an http request, then the server is able to read what the browser has sent.
The problem is that I cannot figure out how the server should reply to the browser. Actually, the server is able to reply to a telnet client. Here the problem is that the server replies every time a character is entered in the telnet window.
Back to the problem... how can the server know when to write to the browser, and how ?
Re: How a server can write "Hello" to a browser ?
You can take a look at the Http Sever example provided by Trolls
Re: How a server can write "Hello" to a browser ?
Quote:
Originally Posted by
probine
Back to the problem... how can the server know when to write to the browser, and how ?
Learn about the HTTP protocol. A page that helped me enourmously was
HTTP Made Really Easy
I have written a HTTP 1.1 Server that integrates nicely with Qt, but I have not yet published it yet (it will be, probably under the LGPL, at some point).
Perhaps if there is demand I will hasten the release. (Problem is in the moment I am missing the "nice" API, and basically all documentation ;-)