Skip to content

Asynchronous Client Socket Example according to the Task-based Asynchronous Pattern. (C#)

Notifications You must be signed in to change notification settings

Tyronezzz/AsynchronousClient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Asynchronous Client Socket Example

The following example program creates a client that connects to a server. The client is built with an asynchronous socket, so execution of the client application is not suspended while the server returns a response. The application sends a string to the server and then displays the string returned by the server on the console.

Reference

This source is based on the Microsoft site example. Microsoft example is written based on the old IAsyncResult pattern. But this source is rewritten according to the Task-based Asynchronous Pattern. (TAP)

Two Template

I use two template source for rewrite old pattern to Task-based Asynchronous Pattern.

Template1: use Begin* and End* methods to change Pattern.

Template2: use base socket methods to change Pattern. (like Send, Receive, and so on)

See Also

Microsoft Example

Task-based Asynchronous Pattern

Interop with Other Asynchronous Patterns and Types

About

Asynchronous Client Socket Example according to the Task-based Asynchronous Pattern. (C#)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages