Boost Users :
Subject: Re: [Boost-users] boost asio
From: FrÃ©dÃ©ric (ufospoke_at_[hidden])
Date: 2017-10-17 11:32:01
> I have created an Asynchronous TCP server and client and it works fine.
> Since it is asynchronous, it uses APIâs like async_read, async_write etc..
> Is it possible that the same code be used to do âsynchronousâ communication
> which results in blocking any further task in the queue unless the current
> i/o task is complete ?
You can do that with synchronization:
after you call asyn_write/read, you wait until done==true and in your
call back function, you acquire the mutex, done == true, then
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net