Boost logo

Boost Users :

Subject: [Boost-users] boost asio disign
From: Christer Borgqvist (christer.borgqvist10_at_[hidden])
Date: 2012-12-19 09:51:02


Hello,
how can I design an application that will have a http server like HTTP
Server 3 example,
but also x number of tcp clients connecting to a server,
client must connect to the server before the http server is active, if
client is idle with a timer events send an 'I'm here' in every 10 seconds,
i tink i have to put the tcp client on a list or ?.
Data is received by the http server get the client from list, if non
available wait for x amount of time, if time elapsed return incomming data,
else,
parsing on incomming data,
send to tcp server, parse response data put the client back on the list,
send response on http,
when sending data via tcp client reset the timer.

I have the http server working but how do I do with the tcp client, design
the threads,
should there be only one io_service?,
I dont now, im lost!

Appreciate all the help.
/Christer


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net