private void OnSocketResponseAsync(SocketResponseEventArg e)
 {
     var handler = this.SocketResponse;
     if (handler != null)
     {
         handler.BeginInvoke(this,
                             e,
                             handler.EndInvoke,
                             null);
     }
 }
        /// <remarks>This code does receiving specifically for the <paramref name="controlComplexSocket" /> and does some logging</remarks>
        private async Task<FtpReply> ReceiveAndLogAsync(ComplexSocket controlComplexSocket,
                                                        CancellationToken cancellationToken)
        {
            this.WaitBeforeReceive();

            var ftpReply = await controlComplexSocket.Socket.GetFtpReplyAsync(this.ChunkReceiveBufferSize,
                                                                              controlComplexSocket.GetSocketAsyncEventArgs,
                                                                              this.Encoding,
                                                                              cancellationToken);

            {
                var socketResponseEventArg = new SocketResponseEventArg(ftpReply.Data);
                this.OnSocketResponseAsync(socketResponseEventArg);
            }

            return ftpReply;
        }