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

Archive Index This month's Index

Subject: RE: libssh2_init()

RE: libssh2_init()

From: Vishal Sharma <vsharma_at_optulink.com>
Date: Tue, 7 Oct 2014 09:05:18 -0500

Thank you for the response.

-----Original Message-----
From: libssh2-devel [mailto:libssh2-devel-bounces_at_cool.haxx.se] On Behalf Of Peter Stuge
Sent: Tuesday, October 7, 2014 12:03 AM
To: libssh2-devel_at_cool.haxx.se
Subject: Re: libssh2_init()

Vishal Sharma wrote:
> Do I call "rc = libssh2_init (0);" within each thread

No.

> should there be a master thread which would call "rc = libssh2_init (0);"

Yes. Call it one time before creating any threads.

Also make sure to guard the shared resource (session) with locks.

//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

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

the libssh2 team