www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: libssh2_init()


From: Vishal Sharma <vsharma_at_optulink.com>
Date: Mon, 6 Oct 2014 16:39:20 -0500



I have a question about libssh2_init() function.

I am using libssh2 library in a multi-thread application. There are several
threads that use sftp and ssh functions to communicated with a remote

My question is - Do I call "rc = libssh2_init (0);" within each thread that
would be performing either read/write via sftp or execute a command on
remote server via ssh? Or should there be a master thread which would call
"rc = libssh2_init (0);" to initialize crypto library in a global context
for the entire application?


Please let me know.


Thank you,


Vishal Sharma

libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2014-10-06

the libssh2 team