
"Tony Juricic" <tonygeek@yahoo.com> wrote in message news:cheogr$v4s$1@sea.gmane.org...
"Bronek Kozicki" wrote:
Sorry for jumping with this question out of nowhere : is it possible to use Iostreams to provide stream-like access to sockets, ie. make platform-independent abstraction over platform-dependent sockets library?
Good point. It looks like File Descriptor Resource that deals with OS handles should, in principle, be able to deal with socket handles as well. However, socket handles are not available in current implementation, as far as I can see reading fdstream.cpp.
There is a comment that non-blocking mode is curently not supported and you would imagine it would be even more important issue with socket handles.
Right. The current file_descriptor resources are only useful for files. The main reason is that they use only one buffer for both input and output. A secondary issue is that they assume the file descriptors are opened in blocking mode. See my reply to Bronek for information.
Tony
Jonathan