title: Boost Asio serial_port - need help with io
body: <p>So I've been trying to learn the boost::asio stuff to communicate to a serial device using RS232.  The documementation is sparse and the examples are non-existent.  Can't figure out exactly how to communicate with the device.  The device can't send data so all I need to do is write, but other projects require actual back and forth communication so help with that would be appreciated.  What code I have so far follows.</p>
  
  <pre><code>#include &lt;boost/asio/serial_port.hpp&gt;
  using namespace::boost::asio;
  
  int main()
  {
      io_service io;
      serial_port port( io, "COM3" );
      port.set_option( serial_port_base::baud_rate( 19200 ) );
  
      unsigned char commands[4] = { 1, 128, 240, 0 };
  
      // write the commands to the device
  
      return 0;
  }
  </code></pre>
  
  <p>In short: need help with the io part of the serial_port.</p>