开发者

Using boost::asio::async_read with stdin?

开发者 https://www.devze.com 2022-12-30 01:21 出处:网络
short question: I have a realtime-simulation which is running as a backround process and is connected with pipes to the calling pogramm. I want to send commands to that process using stdin to get cert

short question: I have a realtime-simulation which is running as a backround process and is connected with pipes to the calling pogramm. I want to send commands to that process using stdin to get certain information from it via stdout. Now because it is a real-time process, it开发者_如何学JAVA has to be a non blocking input. Is boost::asio::async_read in conjunction with iostream::cin a good idea for this task? how would I use that function if it is feasible? Any more suggestions?


Look at boost::asio::posix::stream_descriptor

http://www.boost.org/doc/libs/release/doc/html/boost_asio/example/cpp03/chat/posix_chat_client.cpp

0

精彩评论

暂无评论...
验证码 换一张
取 消