This patches shows what change is needed for http to run with multiple
event loops. This is not very useful still because actual work is not
yet distributed.
The imperative form suggests that in addition to returning a future it
performs some action and thus is needed regardless of whether we want
to add a callback or not. But in fact it does not do anything, just
gives away a future.
Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Instead of returning a pollable_fd from server_socket::accept(), return
a new abstract class connected_socket, which is able to provide an
input_stream and an output_stream to the caller.
Instead of returning the Unix-tied pollable_fd, return an abstract
server_socket class which is then implement atop pollable_fd, but can
be replaced with a native implementation.
Since they are going to be the abstract interface to both the bsd socket
layer and the native tcp stack, rename them to more generic names -
input_stream and output_stream.