3659e8c04a
It's based on poll objects, each of which store a socket, it's events and a callback, which gets called whenever an event is set. The poll objects are attached to a poll context, which should be allocated on per thread basis. Polling the poll context will poll all the attached poll objects and call their callbacks (handlers) if any of the socket events are set. This should be done within the main loop of an application. This is intended as a ground work for making libssh asynchronous. Signed-off-by: Aleksandar Kanchev <aleksandar.kanchev@googlemail.com>