Hi,

I am using asio to read some data from SSL socket. asio tcp socket implements a "receive" function, but ssl socket doesn't have an implementation for "receive". In the code sample given below I wish to implement this kind of behavior.

eg

{
...
  sock.async_read_some(...);
  //continue the execution only after the above call finishes.
}

Whats the best way to do this?

I tried "future" but the code blocks/dead locks some how, The I tried "spawn", but in this case also I don't know the method to wait for the coroutine to finish. 

Some tips are greatly appreciated.

Thanks,
  Lloyd