Richa Mehta wrote: > I want to share the ssh session and channels structures between the > threads in c++, so is it thread safe???
Only one thread at a time can use a session. Protect it with a mutex, and be careful to not release the mutex until the API call is completed successfully or with error. Ie. do not release the mutex when the library returns LIBSSH2_ERROR_EAGAIN. //Peter _______________________________________________ libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel