Archived Forum Post

Index of archived forum posts

Question:

Async Sockets in C#?

Nov 04 '16 at 08:58

I am trying to use AsyncReceivedString() and functions related to Async. You mentioned the new model for asynchronous programming introduced in Chilkat v9.5.0.52 Is it already put on web site for download?? Especially, I need for VS2013 version. If so, may I get example code by c# for asynchronous programming?? Basically, I can't see example about asynchronous programming in Socket by C#!


Answer

The Async methods that begin with the string "Async" are the older and deprecated methods. They should be avoided.

Instead, you want to use the new methods having names the end with the string "Async" and return Chilkat.Task objects. I've created an example on GitHub for you: https://github.com/chilkatsoft/CSharp-Async-Sockets

The C# source is available here: https://github.com/chilkatsoft/CSharp-Async-Sockets/blob/master/AsyncSockets/Form1.cs


Answer

Current recomended asynchronous pattern - TAP (Task-based Asynchronous Pattern).

Chilkat for Desktop (main library in .NET, uses a large percentage of people) not support TAP! Chilkat UWP (uses a small percentage of people) - supported TAP.

Oldest patterns (EAP, APM) - not recomended. Oldest patterns - not implemented in new projects and next time can depercated in next Framework versions.

Question: in next Chilkat release plane add support TAP pattern in Chilkat for Desktop?