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

ssh server: how to do select-driven I/O?


I'm trying to write a Linux ssh server daemon, where the main loop
is select driven: i.e. wait for an event on the set of active filehandles,
then do an accept or a non-blocking read/write as appropriate.

I'm not clear how this should work in a libssh environment. The server
would be accepting multiple ssh connections from libssh clients (without
forking), plus accepting non-ssh connections from elsewhere on a different
listener socket. And possibly setting up reverse tunnels too.

Can anyone give me some pointers, or perhaps the skeleton outline of such
a select loop?

Thanks.

-- 
"You may not work around any technical limitations in the software"
    -- Windows Vista license

Archive administrator: postmaster@lists.cynapses.org