title: Continuously streaming data with Boost::ASIO without closing socket
body: <p>I'm trying to build an application that:</p>
  
  <p>a) Runs an FDM (flight dynamics model) internally, and manages the flight data</p>
  
  <p>b) Accepts connections on a TCP socket</p>
  
  <p>c) Serves the flight data over said socket. </p>
  
  <p>I've currently managed to get a simple string sent over TCP on my a local socket using the examples/tutorials on the Boos::ASIO website here: <a href="http://www.boost.org/doc/libs/1_56_0_b1/doc/html/boost_asio/tutorial.html" rel="nofollow">http://www.boost.org/doc/libs/1_56_0_b1/doc/html/boost_asio/tutorial.html</a></p>
  
  <p>My trouble is simply that the connection closes after a single string is written, and I don't know how to keep the connection open and continuously send the data until the simulation is finished (or a stop signal is sent from the listening application). </p>
  
  <p>I also have the FDM working (currently using JSBSim, and borrowing heavily from their included sample code), and can print flight data to stdout no problem. The Boost:ASIO documentation shows a few examples on how to build a server that constantly listens for messages received from the client, but none that send a stream of data out. </p>