login about faq

Hello,

My FTP host has plans to enforce explicit FTP over TLS soon. I'm updating my application to support this (just a simple application that sends our application EXEs to our FTP server for customer auto-update purposes.)

Everything works just fine, except that the upload speed is roughly HALF of what it is when not setting AuthTls = 1. Is this a known/expected issue? Using FileZilla for comparison, the upload speed does not seem to be affected by using TLS. Any ideas?

Code below. Thanks! -Dan

FTP.AuthTls = 1
FTP.Ssl = 0

FTP.HostName = "myhost"
FTP.Username = "myuser"
FTP.Password = "mypass"

'connect and login to the FTP server
Success = FTP.Connect()

If Success <> 1 Then
    MsgBox FTP.LastErrorText
    GoTo EndOfSub
End If

FTP.ClearControlChannel

Success = FTP.DeleteMatching(Left(EXEName, InStrRev(EXEName, ".") - 1) & "*.exe")

If Success = -1 Then
    MsgBox FTP.LastErrorText
    GoTo EndOfSub
End If

Success = FTP.AsyncPutFileStart(Source, EXEName2)

If Success <> 1 Then
    MsgBox FTP.LastErrorText
    GoTo EndOfSub
End If

Size = FileLen(Source)
lblSize = "of " & Format(Size / 1024, "##,###,##0") & " KB"
pnl.Visible = True

Do While FTP.AsyncFinished <> 1
    lblKB = Format(FTP.AsyncBytesSent / 1024, "##,###,##0") & " KB"
    prg.Value = Int(FTP.AsyncBytesSent / Size * 100)
    lblPrg = prg.Value & "%"
    Caption = lblPrg & " of " & Source
    lblKBSec = Format(FTP.UploadRate / 1024, "#,##0") & " KB/Sec"

    If FTP.UploadRate > 0 Then
        lblTimeRemaining = FormatSeconds((Size - FTP.AsyncBytesSent) / FTP.UploadRate) & " remaining"
    Else
        lblTimeRemaining = "? remaining"
    End If

    Refresh
    DoEvents

    FTP.SleepMs 1000
Loop

lblKB = Format(FTP.AsyncBytesSent / 1024, "##,###,##0") & " KB"
prg.Value = Int(FTP.AsyncBytesSent / Size * 100)
lblPrg = prg.Value & "%"
Caption = lblPrg & " of " & Source
lblKBSec = "0 KB/Sec"
lblTimeRemaining = "0 sec remaining"

If FTP.AsyncSuccess <> 1 Then
    MsgBox FTP.AsyncLog
End If

FTP.Disconnect

asked Sep 19 '13 at 10:00

DanH's gravatar image

DanH
6112


if ($f->ftprcsize) { $ftp->put_SoRcvBuf($f->ftprcsize); }

if ($f->ftpsnsize) { $ftp->put_SoSndBuf($f->ftpsnsize); }

try 262144

link

answered Sep 20 '13 at 14:21

cdlvj130's gravatar image

cdlvj130
9691017

That worked, thanks! I had to translate whatever code that is that you're using to figure out the property was SoSndBuf :) 16k seemed to be a good number for me.

link

answered Sep 24 '13 at 17:20

DanH's gravatar image

DanH
6112

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×90
×32
×6
×4
×2

Asked: Sep 19 '13 at 10:00

Seen: 1,527 times

Last updated: Sep 24 '13 at 17:20

powered by OSQA