Renci.SshNet.Sftp.SftpSession.TryLoadSftpMessage C# (CSharp) Method

TryLoadSftpMessage() private method

private TryLoadSftpMessage ( byte packetData, int offset, int count ) : bool
packetData byte
offset int
count int
return bool
        private bool TryLoadSftpMessage(byte[] packetData, int offset, int count)
        {
            //  Load SFTP Message and handle it
            var response = SftpMessage.Load(ProtocolVersion, packetData, offset, count, Encoding);

            try
            {
                var versionResponse = response as SftpVersionResponse;
                if (versionResponse != null)
                {
                    ProtocolVersion = versionResponse.Version;
                    _supportedExtensions = versionResponse.Extentions;

                    _sftpVersionConfirmed.Set();
                }
                else
                {
                    HandleResponse(response as SftpResponse);
                }

                return true;
            }
            catch (Exception exp)
            {
                RaiseError(exp);
                return false;
            }
        }