login about faq

Hi,

I am using the ActiveX SFTP component in my software (an xml editor).

In the old source code, each time i wanted to create a file on an SFTP server i called SFTP.connect() and then SFTP.CreateFile(). During testing i noticed that connecting to the SFTP server (SFTP.connect()) takes a lot of time, compared to actually creating the file.

So, i changed the source code: now, SFTP.connect() is called only once (per server) and CreateFile() is called many times. This solution is much much faster.

My question is this: is this allowed? Is there a situation where the connection to the server is dropped (maybe if there isn't any traffic for a few minutes?) and i have to call SFTP.connect() again. If so, how do i detect such a situation? Or does the SFTP component automatically takes care of such a situation?

Thank you, - Gerben

asked Jun 02 at 15:14

Gerben%20Abbink's gravatar image

Gerben Abbink
1111


The logic should be connect, and send all the files. If the connect is taking a long time, you have DNS resolve issues.

Depends on the server, the other side. Most disconnect if no traffic, others do not. The is a isConnected method, although I thought that it was depreciated, and should use a checkConnection method. Shows in ftp, but isConnected is still on sftp. Read the note. That is one of the things I do not like. Both sftp and ftp should be combined, and protocol passed as an argument.

You will have to check the status of CreateFile. There should be a error for what you are describing.

link

answered Jun 02 at 19:23

cdlvj130's gravatar image

cdlvj130
9691017

Where do you find CreateFile????

link

answered Jun 02 at 19:28

cdlvj130's gravatar image

cdlvj130
9691017

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:

×200
×96

Asked: Jun 02 at 15:14

Seen: 294 times

Last updated: Jun 02 at 19:28

powered by OSQA