FubarDev.FtpServer.FtpConnection.Write C# (CSharp) Method

Write() private method

Writes a FTP response to a client
private Write ( [ response ) : void
response [ The response to write to the client
return void
        internal void Write([NotNull] FtpResponse response)
        {
            if (!_closed)
            {
                Log?.Log(response);
                var data = Encoding.GetBytes($"{response}\r\n");
                SocketStream.Write(data, 0, data.Length);
                response.AfterWriteAction?.Invoke();
            }
        }