Exemplo n.º 1
0
        /// <summary>
        /// Sends a command to the FTP server, and returns the response
        /// </summary>
        /// <param name="envelope"></param>
        /// <returns></returns>
        public async Task <FtpResponse> SendCommandAsync(FtpCommandEnvelope envelope)
        {
            string commandString = envelope.GetCommandString();

            Logger?.LogDebug($"[FtpClient] Sending command: {commandString}");
            commandSocket.Send(commandString.ToAsciiBytes());

            var response = await GetResponseAsync();

            return(response);
        }
Exemplo n.º 2
0
 public async Task <FtpResponse> SendCommandAsync(FtpCommandEnvelope envelope, CancellationToken token = default(CancellationToken))
 {
     return(await ControlStream.SendCommandAsync(envelope, token));
 }
Exemplo n.º 3
0
        public async Task <FtpResponse> SendCommandAsync(FtpCommandEnvelope envelope, CancellationToken token = default(CancellationToken))
        {
            string commandString = envelope.GetCommandString();

            return(await SendCommandAsync(commandString, token));
        }