I am using code from here: https://github.com/fedetft/serial-port/blob/master/4_callback/main.cpp
Which wraps the boost asio library to read from stream. For some reason when i am trying to read from serial port it just read a single message and then disconnects. On the sending side I have a very simple arduino loop running un an arduino uno which sends a number every second.
I found that this guy is describing what seems to be the exact same problem,
Boost.Asio async_read on serial port completes unexpectedly?
but alas he does not write what his solution was. Can anybody help me shed some light on this? Thank you