LNet

This is an old revision of LNet, edited by Almindor at . The current revision is 14133.

/* Dependencies / System Requirements */

About

lNet or LightWeight Networking Library is a collection of classes and components to enable event-driven TCP or UDP networking. lNet is released under a modified LGPL license. (permits static linking)

The package consists of base lNet units library, lTelnet for telnet protocol, lFTP for ftp protocol and lNetComponents libraries for providing visual and non-visual components for networking.

These components were tested in Win32, Linux and FreeBSD. They should however run on any major platform supported by FPC. Homepage of the lNet base libraries is: http://members.chello.sk/ales

As of version 0.3 the package is only single-threaded. I've dropped multithreaded version and now use exclusivly LCL features to work.

Author

Ales Katona (User: Almindor)

License

Modified LGPL (read LICENSE and LICENSE.ADDON included in package).

Download

Change Log

Roadmap

Dependencies / System Requirements

Status: Beta

Issues: Tested on Windows (WinXP), Linux (Kubuntu Breezy Badger) and FreeBSD 6.0.

Installation

I STRONGLY ADVISE USING THE ST VERSION

Usage

Drop a TLTCPComponent or TLUDPComponent on a form. Assign OnAccept, OnError, OnReceive and OnDisconnect event handlers. Note that this is optional but in most cases required for functionality. Note also that if you don't assign OnError it will throw an exception in such case when a connection error occurs.

Optional properties you may set are:

Client connection is initialized with the Connect call. Arguments are IP address/hostname and port respectivly.

Server connection is initialized with the Listen* call. Argument is port.

Note: address is a string representation of IP eg: '127.0.0.1' or a hostname like 'localhost'.

Sending data to the other side is accomplished with the SendMessage method. Arguments are data to be sent in string form.

Note: Currently the components are limited. I will add input and output classes/components for better handling later.

Events of TLNetComponent class.

API CHANGES:* There have been some API changes from 0.1 to 0.2. These were required and should improve the usability of packages. I know API changes are always a PITA but I'll try to keep them minimal from now on. Version 0.3 will be the first beta from which API will remain unchanged (only adding new stuff will be possible).