[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

non-blocking server api


Hi,

I've been trying to build a simple non-blocking ssh server.

I tried to use ssh_bind_accept, but it seems to block.

I found that with a single new api, I could build one.  I'd like to
request comment, and whether I should formally send patches.

The commit with the new api function is:

https://github.com/pmundkur/libssh/commit/3f0b8c0f30d869d57b4dc813a84877d9174a15cd

and an accompanying fix:
https://github.com/pmundkur/libssh/commit/df0fd2707c070e5f51ba3d68a8db694465eced0e

With this, an example of a fully non-blocking non-forking
callback-based server is here:

https://github.com/pmundkur/libssh/blob/a4e8c2857c11192d14f2039b4d9063307ab8f13d/examples/sshd-cb.c

Thanks,

--prashanth

Follow-Ups:
Re: non-blocking server apiPrashanth Mundkur <pmundkur.ssh@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org