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

Re: Peer to peer libssh usage questions


On 21.04.21 17:08, Vishwanathan Chandru wrote:
> Is there a way to establish connections to multiple hosts in a
> non-blocking way? I’m looking for some advice on how to use
> ssh_connect() to start establishing multiple connections with non
> blocking sessions and perhaps use poll as a way to multiplex moving
> each connection along individually. Is a call to ssh_set_blocking()
> sufficient to set up the session as non blocking?

You could use a thread per session. Then you don't have to worry about
authentication blocking other sessions...

I.e. a blocking listener / main loop which starts a thread for each
incoming connection request.

What you can't do though is sharing a session between threads...


References:
Peer to peer libssh usage questionsVishwanathan Chandru <vishwanathanc@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org