Hi LibSsh Mailing List ;)

I'm just discovering libssh and like to use it for a program i am maintaining 
(running under windows).

Not really a great developer, but looking for a simple and efficient solution i 
was interested in libssh librairie (C language, documentation).


My question is relative to the management of multi-session / multi-thread.


I'd like to initiate 3 sessions in a main thread, and then communicate with 3 
servers in 3 parallel threads (the threads are initiated with the CreateThread 
windows function)


Do you think i need to apply what is recommended in the Chapter 8 Threads with 
libssh of documentation ?

(http://api.libssh.org/master/libssh_tutor_threads.html)


Should i use pthreads library instead of CreateThread ?


Are there some examples on how to use the structure related to thread or the 
only 2 lines in documentation are enough ?
    * ssh_threads_set_callbacks(ssh_threads_get_pthread());
    * 
ssh_init<http://api.libssh.org/master/group__libssh.html#ga3ebf8d6920e563f3b032e3cd5277598e>();




Or do you think initiating 3 different sessions in the same thread can allow to 
then concurrently use each session to communicate ?



I hope my message is clear and i gave enough information...

Thanks in advance for any answer,


Best Regards,


Marc Pichot


# " Ce courriel et les documents qui lui sont joints peuvent contenir des 
informations confidentielles ou ayant un caractère privé. S'ils ne vous sont 
pas destinés, nous vous signalons qu'il est strictement interdit de les 
divulguer, de les reproduire ou d'en utiliser de quelque manière que ce soit le 
contenu. Si ce message vous a été transmis par erreur, merci d'en informer 
l'expéditeur et de supprimer immédiatement de votre système informatique ce 
courriel ainsi que tous les documents qui y sont attachés." ****** " This 
e-mail and any attached documents may contain confidential or proprietary 
information. If you are not the intended recipient, you are notified that any 
dissemination, copying of this e-mail and any attachments thereto or use of 
their contents by any means whatsoever is strictly prohibited. If you have 
received this e-mail in error, please advise the sender immediately and delete 
this e-mail and all attached documents from your computer system." #

Reply via email to