Glossary Item Box

PowerTCP SSL Sockets for .NET

Synchronous vs Asynchronous Methods

The decision of whether to use synchronous or asynchronous methods can be crucial and have an impact on the complexity of your code and the user experience.

The following lists discuss some of the characteristics of synchronous and asynchronous methods in PowerTCP.

Synchronous Methods

Asynchronous Methods

Most applications written with PowerTCP will be synchronous. The reasons for this are not purely due to the ease-of-use of synchronous methods. Synchronous methods are ideal for automated processes that can execute a blocking method for a long period of time. In addition, synchronous methods can work well for interactive applications. The Object.DoEvents property controls the processing of user interface messages while a synchronous method is executing. This means that while a synchronous method is executing, other portions of the application will be able to respond to events (for example, button or menu clicks).

Asynchronous methods, on the other hand, provide a great deal of power. When an asynchronous method is called, the method will execute on a thread separate from the calling thread. Such operation is useful when an action is time consuming and other code needs to execute without waiting for the initial operation to complete. In addition, the user interface will be most responsive when asynchronous methods are used.

 

In This Section

The Server and Tcp Components
Examines use of the Server and Tcp components.
The Udp Component
Examines use of the Udp component.
The Dns, Ping and Trace Components
Examines use of the Dns, Ping and Trace components.
Security
Describes use of security.
Synchronous vs Asynchronous Methods
This topic discusses the benefits and uses for synchronous and asynchronous methods.
Using EndXXX Events
Describes how to use the EndXXX events that are raised upon the completion of a method.
Using Editor Forms
Describes how to use the component designer Editor Forms.

 

 


Send comments on this topic.

Documentation version 1.1.2.0.

© 2008 Dart Communications.  All rights reserved.