public IncomingFileTransfer(FileTransferManager owner, IncomingFileTransferInfo info) : base(owner)
 {
     id         = info.Id;
     State      = FileTransferState.Waiting;
     Sender     = info.Sender;
     Name       = info.Name;
     BytesTotal = info.Size;
     Hash       = info.Hash;
     BlockSize  = info.InitBlockSize;
 }
        private void OnSvFileTransferRequest(SvFileTransferRequest msg)
        {
            var info = new IncomingFileTransferInfo
            {
                Id            = msg.SessionId,
                Sender        = msg.Username,
                Name          = msg.FileName,
                Size          = msg.FileSize,
                Hash          = msg.FileHash,
                InitBlockSize = Math.Min(blockSize, msg.BlockSize)
            };
            var ft = new IncomingFileTransfer(this, info);

            // XXX: check key presence
            assignedFts.Add(ft.Id, ft);
            Root.Log(LogLevel.Info, "FileTransferManager: created incoming session [file='{0}', sid={1}]",
                     msg.FileName, msg.SessionId);
            OnTransferRequestReceived(ft);
        }