libssh 0.2.1
libSSH runtime loading and compile time linking binding
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
libssh binding
By default used configuration ctlink
for linking at compile time.
You need instal libssh
before building your application.
Configuration rtload
implies that your application need load library
at runtime by loadLibSSH()
call. It may be useful for cross-compilation
without need target libssh
. For dynamic loading used ssll
library.
version (libssh_rtload)
{
loadLibSSH();
scope (exit) unloadLibSSH();
}
auto s = ssh_new();
... // other libssh calls
Due to the mismatch between C and D direct copy-paste from C examples
don't work, some constants placed as enum
-lists and has redundant
naming but some not:
// C code
ssh_options_set(session, SSH_OPTIONS_HOST, args[1]);
...
rc = ssh_channel_open_session(channel);
if (rc != SSH_OK) ...
// D code
ssh_options_set(session, ssh_options_e.SSH_OPTIONS_HOST, args[1].toStringz);
...
rc = ssh_channel_open_session(channel);
if (rc != SSH_OK) ...
For more comforable use added libssh/dconst.d
file with
definition of library constants.
// D code
ssh_options_set(my_ssh_session, SSH_OPTION.HOST, args[1].toStringz);
...
rc = ssh_channel_open_session(channel);
if (rc != SSH_RETCODE.OK) ...
Used libssh
headers from version 0.8.7.
- 0.2.1 released 5 years ago
- deviator/libssh
- MIT
- Authors:
- Dependencies:
- none
- Versions:
-
0.2.1 2019-Jul-25 0.2.0 2019-Jul-24 ~master 2019-Jul-25 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
20 downloads total
-
- Score:
- 0.4
- Short URL:
- libssh.dub.pm