libssh2 and simultaneous connections
- by Florian Margaine
I'm writing a node.js C++ module using the C library libssh2. The module is supposed to be a bridge to connect to SSH over HTTPS.
Right now, I'm still in the design/learning phase of v8 API and C++, and I have a design question:
libssh2 is a C library, all its methods are global. From what I see in the examples, libssh2 can only handle one connection at a time.
If I want to allow simultaneous connections to different SSH servers, do I have to fork a process to completely separate the libssh2 "instances", or is forking a thread enough? I don't know enough of the separation limit used there.
Any idea on how to handle this is appreciated.