Glossary Item Box

PowerTCP SSL Sockets for .NET

The Tcp and Server Components

Tcp Component

The Tcp component makes communicating with servers quite easy. The Tcp component can be used in one of two ways to send and receive data:

  1. Use the high-level interface (Send, Receive, EndSend, BeginReceive).
  2. Use the stream-interface (Stream.Write, Stream.Read)

When the high-level interface is used, internally the stream-interface will be used, so both methods send and receive data in exactly the same way.


Reasons to use the high-level interface:


Reasons to use the stream-interface:


For more complex situations, we would recommend developing using the stream-interface.

 

Server Component

The Server component can be used to rapidly construct custom server applications. Whenever a new connection is made, a Tcp object representing the connection will be created and exposed. Use this TCP connection to communicate with the individually connected clients.

 

In This Section

Basic Sending and Receiving of Data
Demonstrates the simplest usage examples for the Tcp component.
Receiving All Data
Demonstrates how to receive all data from the server.
Receiving Fixed Chunks of Data
Demonstrates how to receive fixed size blocks of data from the server.
Receiving to a Delimiter
Demonstrates how to receive data from the server until a delimiter is reached.
Asynchronous Use
Demonstrates how to use the Tcp component to send or receive data asynchronously from the server.
Creating a Simple Echo Server Application
Provides a step-by-step walkthrough demonstrating how to create a simple server application which simply echoes back all data it receives.
Creating a Server Which Handles Commands
Provides a step-by-step walkthrough demonstrating how to create a simple server application which understands and replies to commands.

Related Sections

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.