Success := CkBinData_LoadFile(bdToSend, 'somePath/someFile.dat') It just involves streaming or // sending the file chunk-by-chunk.) // This section of code is for the sender. (If the file is too large for memory, there are other ways to send. This example assumes the file is not crazy-large, and that the entire contents // can fit into memory. ![]() On the receiving side, we'll read from the socket connection into a BinData, and save to a file. ![]() On the sending side, we'll load the file into a BinData object and send. See Global Unlock Sample for sample code. Procedure TForm1.Button1Click(Sender: TObject) īegin // This example requires the Chilkat API to have been previously unlocked. Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, BinData, Socket Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, * The examples here use the non-ActiveX DLL. ![]() ![]() The connection can be TLS or a regular non-encrypted TCP connection. (Delphi DLL) Transfer a File using Sockets (TLS or non-TLS)ĭemonstrates how to two programs, one a socket writer and the other a socket reader, can transfer a file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |