C++ CkHttp AbortCheck Callback

Chilkat classes that involve network communications can use callbacks. This blog post describes the CkHttp AbortCheck callback. An application can request periodic AbortCheck callbacks according to the HeartbeatMs property setting. (If HeartbeatMs = 0, then no AbortCheck callbacks will occur.) For example:

Delphi DLL TaskCompleted Callbacks

Also see: Delphi DLL AbortCheck Callbacks Delphi DLL PercentDone Callbacks Delphi DLL ProgressInfo Callbacks 1) First define a procedure exactly as shown here. Make sure to use the “cdecl” calling convention. 2) Set the task completed callback by calling the appropriate SetTaskCompleted function. For the CkRest object it is CkZip_SetTaskCompleted(rest,MyTaskCompleted); Note: This example shows TaskCompleted callbacks using CkRest. The same […]

Delphi DLL ProgressInfo Callbacks

Also see: Delphi DLL AbortCheck Callbacks Delphi DLL PercentDone Callbacks Delphi DLL TaskCompleted Callbacks 1) First define a procedure exactly as shown here. Make sure to use the “cdecl” calling convention. 2) Set the ProgressInfo callback by calling the appropriate SetProgressInfo function. For the CkSocket object it is CkSocket_SetProgressInfo(sock,MyProgressInfo); Note: This example shows ProgressInfo callbacks using CkSocket. The same technique […]

Delphi DLL AbortCheck Callbacks

Also see: Delphi DLL PercentDone Callbacks Delphi DLL ProgressInfo Callbacks Delphi DLL TaskCompleted Callbacks 1) First define a function exactly as shown here. Make sure to use the “cdecl” calling convention. Returning a non-zero Result will cause the Chilkat method to abort. 2) Set the abort check callback by calling the appropriate SetAbortCheck function. For the CkZip object it is […]

Delphi DLL PercentDone Callbacks

Also see: Delphi DLL AbortCheck Callbacks Delphi DLL ProgressInfo Callbacks Delphi DLL TaskCompleted Callbacks 1) First define a function exactly as shown here.  Make sure to use the “cdecl” calling convention. Returning a non-zero Result will cause the Chilkat method to abort.  It is important to set Result := 0 to allow the Chilkat method to continue. 2) Set the […]

C Language Callbacks

This example demonstrates the general pattern for implementing some standard event callbacks functions for the Chilkat “C” API.  All Chilkat “classes” what have events will use the standard Chilkat events shown in the example below (AbortCheck, PercentDone, and ProgressInfo). This example demonstrates callbacks for an SFTP download, but the same technique applies to any other Chilkat “class”, such as HTTP, […]

Event Callbacks in Java

Event callbacks in Java (including Android) are supported starting in v9.5.0.52. To receive event callbacks, first create a Java class derived from one of the Chilkat event callback classes. The event callback classes are: CkBaseProgress, CkHttpProgress, CkZipProgress, CkFtp2Progress, CkMailManProgress, CkTarProgress, and CkSFtpProgress. All future Chilkat classes will only use CkBaseProgress. Theses event callback classes will be documented in the “Events” […]

HTTP Progress Monitoring in C++

This blog post shows how to monitor the progress of HTTP uploads and downloads in C++.  The first step is to create a C++ callback class that derives from the CkHttpProgress base class.  You’ll be overriding one or more of the callback methods.  For example: class MyHttpProgress : public CkHttpProgress { public: MyHttpProgress(void) { } virtual ~MyHttpProgress(void) { } void […]