Results 1 to 3 of 3

Thread: How a server can write "Hello" to a browser ?

  1. #1
    Join Date
    Jan 2006
    Posts
    185
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default 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 ?

  2. #2
    Join Date
    Jan 2006
    Location
    Kerala
    Posts
    371
    Thanks
    76
    Thanked 37 Times in 32 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How a server can write "Hello" to a browser ?

    You can take a look at the Http Sever example provided by Trolls
    We can't solve problems by using the same kind of thinking we used when we created them

  3. #3
    Join Date
    Jan 2006
    Posts
    128
    Thanked 28 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How a server can write "Hello" to a browser ?

    Quote Originally Posted by probine View Post
    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 ;-)

  4. The following user says thank you to camel for this useful post:

    sunil.thaha (2nd December 2006)

Similar Threads

  1. The server cannot write to the client. Why?
    By probine in forum Newbie
    Replies: 12
    Last Post: 24th March 2006, 18:14
  2. synching client readings to server output
    By OnionRingOfDoom in forum Qt Programming
    Replies: 14
    Last Post: 28th January 2006, 19:15

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.