TCP

From Clean
(Difference between revisions)
Jump to: navigation, search
(Created page with 'The TCP library contains functions and data structures to write Clean programs that communicate by means of the TCP protocol (transmission control protocol). This protocol lets …')
 
 
Line 10: Line 10:
  
 
The library is integrated with the [[Object I/O]] library. The tutorial to the [[Object I/O]] library contains the documentation for this package.
 
The library is integrated with the [[Object I/O]] library. The tutorial to the [[Object I/O]] library contains the documentation for this package.
 +
 +
The TCP library  consists of the following library modules:
 +
{|style="width:100%" border="1"
 +
!Name || Description
 +
|-
 +
|StdChannels || contains operations to send and receive on channels.
 +
|-
 +
|StdEventTCP || contains functions for using event driven TCP.
 +
|-
 +
|StdStringChannels || defines instances to send and receive strings.
 +
|-
 +
|StdTCP || convenience module to easily import the TCP API.
 +
|-
 +
|StdTCPChannels || defines instances for most of the classes defined in StdChannels.
 +
|-
 +
|StdTCPDef || contains various type definitions needed for event driven communication.
 +
|}

Latest revision as of 11:28, 6 July 2010

The TCP library contains functions and data structures to write Clean programs that communicate by means of the TCP protocol (transmission control protocol). This protocol lets you establish channels to send and receive data via a network.

The library can be divided into two parts: The synchronous and the asynchronous part.

The synchronous part is applicable in non event driven programs (e.g. simple console applications) as well as in event driven programs (GUI-applications using the Object I/O Library). Many function calls can _block_ the whole Clean program until the corresponding action has been completed. For instance synchronously receiving data via a channel can block for a long time until the data arrives via the network. In that time the program does not proceed in it's execution.

Although the synchronous part is easier to use it's blocking behaviour could raise problems in conjunction with GUI (graphical user interface) programs. These problems can be circumvented by using the asynchronous (event driven) part of this library.

The library further offers acces to the DNS (domain name service).

The library is integrated with the Object I/O library. The tutorial to the Object I/O library contains the documentation for this package.

The TCP library consists of the following library modules:

Name Description
StdChannels contains operations to send and receive on channels.
StdEventTCP contains functions for using event driven TCP.
StdStringChannels defines instances to send and receive strings.
StdTCP convenience module to easily import the TCP API.
StdTCPChannels defines instances for most of the classes defined in StdChannels.
StdTCPDef contains various type definitions needed for event driven communication.
Retrieved from "http://clean.cs.ru.nl/TCP"
Personal tools