Welcome messages

This commit is contained in:
ChristianVisintin
2020-12-04 14:00:23 +01:00
parent 809b3b8d99
commit 82a19dd089
4 changed files with 15 additions and 6 deletions

View File

@@ -225,7 +225,7 @@ impl FileTransfer for FtpFileTransfer {
port: u16,
username: Option<String>,
password: Option<String>,
) -> Result<(), FileTransferError> {
) -> Result<Option<String>, FileTransferError> {
// Get stream
let mut stream: FtpStream = match FtpStream::connect(format!("{}:{}", address, port)) {
Ok(stream) => stream,
@@ -273,7 +273,7 @@ impl FileTransfer for FtpFileTransfer {
// Set stream
self.stream = Some(stream);
// Return OK
Ok(())
Ok(self.stream.as_ref().unwrap().get_welcome_msg())
}
/// ### disconnect