Boost Users :
Subject: Re: [Boost-users] I need a sample Asio asynchronous client to read&write into sockets and stdin&stdout.
From: Christopher (cpisz_at_[hidden])
Date: 2012-01-30 15:25:09
vincegata <vincegata <at> gmail.com> writes:
> I am writing a client application that reads and writes data into a
> remote server. Currently the communication is done using synchronous
> (blocking) sockets. I am running Ubuntu and using C++.
> I need to re-write this app so it will asynchronously read & write into
> sockets and stdin/stdout, I also need to send a heartbeat signal if
> there wasn't any communication with the server for 60 seconds. I am new
> to Asio, I went through tutorial and looked at the examples such as
> asynchronous timer and client chat but they are not all that I need.
> Could someone point me to a sample Asio application that does what I need.
Rather than asking for someone else to write a program that meets your
requirements, could you be more specific about what you don't understand
pertaining to the asio library?
Asynchronous operations have adequate examples as far as I know.
Tcp/ip also has adequate examples as far as I know.
A heartbeat is out of the scope of the library and is a basic thing you should
be able to gleam from any networking example on the web or come up with
Writing to stdin/stdout is basic c++ and doesn't have much to do with at all
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