[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Peer to peer libssh usage questions
[Thread Prev] | [Thread Next]
[Date Prev] | [Date Next]
- Subject: Re: Peer to peer libssh usage questions
- From: g4-lisz@xxxxxxxxxxxx
- Reply-to: libssh@xxxxxxxxxx
- Date: Wed, 21 Apr 2021 17:47:21 +0200
- To: libssh@xxxxxxxxxx
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...
Peer to peer libssh usage questions | Vishwanathan Chandru <vishwanathanc@xxxxxxxxx> |