login about faq

Does the SFTP component allow for (or have) file streams.

We have a model where file streams from the browser must be passed to our Gentran based SFTP system and vice-versa.

asked Jul 11 '16 at 16:53

LimeyRedneck's gravatar image


Thanks! Chilkat is planning to add streaming functionality to FTP, SFTP, etc., but it's not yet in the current version. (The Chilkat.Stream class was introduced in a recent version, and some proof-of-concept functionality was added to Compression and Crypt2. Other classes will use the Stream object similarly. Unfortunately, it'll take some time..)


answered Jul 12 '16 at 12:58

chilkat's gravatar image

chilkat ♦♦

Any suggestions on how to proceed while we're waiting on Chilkat libs?


answered Jul 12 '16 at 15:41

LimeyRedneck's gravatar image


Thanks. I should've described a way for an application to implement streaming.

The SSH File Transfer Protocol is defined here: https://tools.ietf.org/html/draft-ietf-secsh-filexfer-02

The reason I point this out is that the operations that are defined (i.e. messages) are very much in the same fashion as the old and very well known "C" file IO functions: open, close fread, fwrite, etc. Therefore, the Chilkat SFTP API has methods that effectively correspond to an underlying operation in the protocol. For example, there is OpenFile (which returns a handle), CloseHandle, and a number of ReadFile and WriteFile methods (each of which takes a handle).

Therefore, if your program wishes to stream to a remote file via SFTP, it can call OpenFile to get the handle, and then call WriteFileBytes or WriteFileText any number of times to continue writing to the open file, until eventually your app would call CloseHandle. The same applies for reading: OpenFile, followed by one or more calls to ReadFileBytes or ReadFileText, and then finally calling CloseHandle.


answered Jul 12 '16 at 16:35

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

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



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



Asked: Jul 11 '16 at 16:53

Seen: 3,360 times

Last updated: Jul 12 '16 at 16:35

powered by OSQA