
"Stefan Seefeld" <seefeld@sympatico.ca> wrote
Arkadiy Vertleyb wrote:
I would expect both asio and a stream API to be layered on top of low-level socket API. This socket API should wrap the platform dependency, but otherwise provide pretty much the same capabilities as current C socket APIs provide, with minimum overhead.
Yes. Though I'm not sure a thin wrapper around the platform API adds much value at all. Too big are the differences. And besides, why should people really care whether the thing is a socket, as long as the semantics are correct ?
From the usage point of view there might be little difference, as long as it works correctly, and doesn't add a lot of performance overhead.
But from the design point of view, I think it's important. And if the socket class is used to perform synchronous IO, I don't think the user should have to create the demuxer object and carry it around. Also, IMO, something that is presented as a "Socket" should not hide things that are conceptually related to the socket usage, rather than the socket itself. These things should be located elsewhere, so that they become relevant only if used. Regards, Arkadiy