I currently have a server using Asio like the example here. Currently, it works as intended in that every packet it receives from the client is responded to by the session::handle_read
function.
However, I want to modify the server so that it can also accept data from the command line and send that across the packet to the client (unsolicited by the client) while still listening for input from the client.
I'm not really sure where to start modifying what I have... so pointers there would be helpful. I'm thinking that I need additional work in the session::start
function (e.g. read from the command line then use an async_write
to write out that data); does that seem logical?