
24 Apr
2005
24 Apr
'05
9:32 p.m.
Peter Dimov wrote:
5. read_later, etc
...
async_read should not take a buffer; instead, the callback should receive a pointer to a buffer managed by the library that is guaranteed to be valid for the duration of the callback. (Not by default, at least.)
If we ever extend this library to supporting connections on X.25 libraries, at least one X.25 adapter vendor require that transfer buffers be allocated by special API calls beforehand, presumably because they are mapped to memory on the adapter card. I guess it wouldn't be too difficult to allow either model, i.e use what ever the called supplied, or allocate one automatically. Or - place the decision in a policy template class or something like that. Mats