[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Questions on threading and networking


Hi, 

I'm brand new to libssh, and trying to understand if it can fit into my use case. 

I have an application that runs in a Docker container, and would like to embed an SSH server within that application in order to access its Command Line Interface (CLI). The application has a specific threading and networking model based on ASIO, and I'm trying to determine whether libssh can integrate with this model. 

I did see that libssh will accept a socket descriptor from an external source, meaning I can provide my own listener. But does this mean that libssh takes ownership of the socket and associated i/o on it, presumably under its own thread, rather than accepting/providing data from/to the application on socket read/write events? 

A good example of the model I'm after is the nghttp2 library, which provides an HTTP/2.0 implementation that is fully decoupled from the networking. Buffers are passed back and forth via API calls and callbacks between the library and the application, allowing the application to manage the threading and networking. 

I'd greatly appreciate some comments on the suitability of libssl to this use-case and its integration requirements. 

Thanks, 
Brian 


Follow-Ups:
Re: Questions on threading and networkingAndreas Schneider <asn@xxxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org