MCPcopy Create free account
hub / github.com/BitVM/BitVM / test_connection

Function test_connection

bridge/src/client/data_store/sftp.rs:269–277  ·  view source on GitHub ↗
(credentials: &SftpCredentials)

Source from the content-addressed store, hash-verified

267}
268
269async fn test_connection(credentials: &SftpCredentials) -> Result<(), String> {
270 match connect(credentials).await {
271 Ok(sftp) => {
272 disconnect(sftp).await;
273 Ok(())
274 }
275 Err(err) => Err(format!("Failed to connect: {}", err)),
276 }
277}
278
279async fn connect(credentials: &SftpCredentials) -> Result<_Sftp, String> {
280 let result = SshSession::connect_mux(

Callers 1

newMethod · 0.70

Calls 2

connectFunction · 0.85
disconnectFunction · 0.70

Tested by

no test coverage detected