File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -43,3 +43,7 @@ A simple forwarding example which works as an agent and client at the same time
43
43
44
44
Dumps identities stored by the agent.
45
45
Additionally invokes an extension and reads the result.
46
+
47
+ ### ` ssh-agent-client-blocking `
48
+
49
+ Dumps identities stored by the agent using blocking (synchronous) API.
Original file line number Diff line number Diff line change 1
- //! Blocking API.
1
+ //! Blocking SSH agent client API.
2
+ //!
3
+ //! Blocking API is always enabled since it doesn't use additional
4
+ //! dependencies over what is in the `proto` module and Rust standard
5
+ //! library.
6
+ //!
7
+ //! # Examples
8
+ //!
9
+ //! ```no_run
10
+ //! # #[cfg(unix)]
11
+ //! # fn main() -> testresult::TestResult {
12
+ //! use std::os::unix::net::UnixStream;
13
+ //!
14
+ //! use ssh_agent_lib::blocking::Client;
15
+ //!
16
+ //! let mut client = Client::new(UnixStream::connect(std::env::var("SSH_AUTH_SOCK")?)?);
17
+ //!
18
+ //! eprintln!(
19
+ //! "Identities that this agent knows of: {:#?}",
20
+ //! client.request_identities()?
21
+ //! );
22
+ //! # Ok(()) }
23
+ //! ```
2
24
3
25
use std:: io:: { Read , Write } ;
4
26
@@ -21,7 +43,7 @@ pub struct Client<S: Read + Write> {
21
43
}
22
44
23
45
impl < S : Read + Write > Client < S > {
24
- /// Construct a new SSH agent client for a given transport stream.
46
+ /// Construct a new SSH agent client for the given transport stream.
25
47
pub fn new ( stream : S ) -> Self {
26
48
Self { stream }
27
49
}
You can’t perform that action at this time.
0 commit comments