boost asio - async_read and deadline_timer don't call their handler functions
Hello,
I want to use asio library for my serial communication module but I'm having trouble on asynchronous functionality.
In the following code block, I wanted to read 5 bytes from the first serial port of my computer in 10 seconds. But none of the handler functions were called. Firstly I waited not inputing any bytes but timer did not call wait_handler. Secondly I sent 5 bytes in 10 seconds from the other computer but read_handler was not called.
I could read the bytes using synchronous functions like read function, I mean there is nothing wrong with the communication.
I tried this code both on a Windows and a Linux host but results were the same..
Can you please check what can be wrong with the following code?
**************************************************************
#include <iostream>
#include
It's done! Thank you very much.. ________________________________________ Kimden: boost-users-bounces@lists.boost.org [boost-users-bounces@lists.boost.org], Igor R [boost.lists@gmail.com] Adına Tarih: 25 Kasım 2009 Çarşamba 18:14 Kime: boost-users@lists.boost.org Konu: Re: [Boost-users] boost asio - async_read and deadline_timer don't call their handler functions
Sleep(30000); //30 seconds
Change the above line to: io.run(); _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users ###################################################################### Dikkat: Bu elektronik posta mesaji kisisel ve ozeldir. Eger size gonderilmediyse lutfen gondericiyi bilgilendirip mesaji siliniz. Firmamiza gelen ve giden mesajlar virus taramasindan gecirilmekte, guvenlik nedeni ile kontrol edilerek saklanmaktadir. Mesajdaki gorusler ve bakis acisi gondericiye ait olup Aselsan A.S. resmi gorusu olmak zorunda degildir. ###################################################################### Attention: This e-mail message is privileged and confidential. If you are not the intended recipient please delete the message and notify the sender. E-mails to and from the company are monitored for operational reasons and in accordance with lawful business practices. Any views or opinions presented are solely those of the author and do not necessarily represent the views of the company. ######################################################################
participants (2)
-
Gözde Bahar KOŞ
-
Igor R