Sign in Join
Wiki copytemporary

Sockets

English · Español · Français · Slovenčina

About

Warning: **THIS IS DEPRECATED AND DEPENDS ON VERY OLD Lazarus 0.9.6 (FPC 1.9.8) VERSIONS.
DOCUMENTATION PURPOSE ONLY.
**

Sockets is a modified-LGPL package for Lazarus. It defines the TSocketClient component for connecting applications to generic server sockets over TCP/IP networks.

The download contains the component Pascal files, the Lazarus package file and resource files and the modified-LGPL license text files.

This component was designed for applications running on Linux and Win32 platforms.

Author

Antonio d'Avino

License

Modified LGPL (read COPYING.modifiedLGPL and COPYING.LGPL included in package).

Download

(As noted on 26-June-2012, the author's website does not work nor there is a "Sockets" package on SourceForge's download page)

The latest stable release can be found on Lazarus CCR Files page or on author's web pages http://infoconsult.homelinux.net.

Change Log

Roadmap

Dependencies / System Requirements

Status: Beta

Issues: Tested on Windows (Win2K) and Linux (Mdk 10.1).

Installation

Note for Win32 users: In case you experience some difficults in compiling the Pascal files, you may need to add the following path: <some-drive>:<some-path>\lazarus\lcl\units\i386\win32 (ie: c:\programs\lazarus\lcl\units\i386\win32) to the 'Other unit files ...' in 'Paths' tab of 'Compiler Options' of the lazarus package manager window.

Usage

Drop a TSocketClient component on a form, for any different client socket connections your application needs. Mandatory property of this component you have to set are:

Optional properties you may set are:

Now you can set to 'True' the property Active for opening the channel. An exception is raised if connection fails (host unreachable, no server process listening on port, network errors). The connection is closed setting 'False' the active property. Also, you can test the Active property to verify if connection status is ON (the closing of the connection by the server side set false this property).

Public methods of the TSocketClient class.

If a complete line can be copied, the function returns true. If not any LF char is encountered, the whole internal buffer is copied into the 'buffer' parameter and the function returns false.

Note: the pending content in internal buffer is available also when the connection is closed. It will be lost only when the connection is reopen.

Note: at this moment, the write methods of the class are not asynchronous, so they may be blocking for your application in case of failing. This will be fixed in next release.

Events of TSocketClient class.


From the Free Pascal wiki, page "Sockets", as it stood on 2021-05-03 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 1, last changed by WikiArchive .

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.