I would like to know what Poco classes to use in listening for a browser request. This is for a proxy server.
In general I want to open a port and wait for a request from a browser.
Please give an example as I’m quite new to Poco and C++ in general.
I would like to know what Poco classes to use in listening for a
Share
You can look at the HTTPTimeServer (http://pocoproject.org/docs/00100-GuidedTour.html#4) example. Basically you need:
the server process.
socket to listen at.
charge of accepting connections and
dispatching them to
HTTPRequestHandler derived instances.
the server the number of threads and
the size of the connection backlog.
derive from this class to handle
requests.
You derive from this class to create
handler instances.
contains the information in the
request (i.e. headers, body, cookies,
authentication).
populate an instance of this class
with response information such as
headers and body.