I am looking for a generic IO class. It shall be able to handle sources and sinks from a socket or a file. I have been looking at boost iostream and asio but I need a generic interface to a source or a sink that can be ether socket or a file.
There are several socket libraries that extend iostreams to provide an interface to sockets. I suggest you look into those also:
I'm not sure about their cross platformability, though.