LNet

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

/* Change Log */

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

Status

Roadmap

Dependencies / System Requirements

Status: Beta

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

Installation

Usage

TCP/UDP

Drop a TLTCPComponent or TLUDPComponent on a form. Assign OnAccept, OnError, OnReceive, OnConnect and OnDisconnect event handlers. Note that this is optional but in most cases required for functionality.

Client connection is initialized with the Connect call. Arguments are IP address/hostname and port respectivly. Non-blocking connect is used, this means that you DON'T know that you're connected until OnConnect event is fired.

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 Send/SendMessage method.

Events of TLNetComponent class.

API CHANGES:*

0.1 to 0.2 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).

0.2 to 0.3 Added OnCanSend and OnConnect. Connect is now non-blocking. Removed buffersize and maxmsgs. Buffersize is no longer required because no internal buffer is used.