[Lazarus] lnet component

Bernd prof7bit at gmail.com
Wed Sep 5 11:25:16 CEST 2012


2012/9/5 Bernd <prof7bit at gmail.com>:

> If you want to have multiple TLTcp using the same thread then you must
> create only one Thread and one separate TLSelectEventer and assign
> this eventer to each of your TLTcp objects.

Note that when you are placing a TLTcp component on a form in the form
designer then it will by default already have an eventer but it will
be a very special class of eventer that is deeply tied into the LCL
and generate its events from within the GUI event loop, you cannot
call CallAction on this class of eventer. To make your own event loop
you have to create a TLSelectEventer (or a TLEpollEventer on unix
systems or a TLBestEventer on all systems) yourself and assign that
eventer to the TLTcp. From then on you must use CallAction() in your
own event loop. If you create a new TLTcp instance yourself (like in
my above example) it will by default already have a TLBestEventer
(either select or epoll) already created and assigned by default.




More information about the Lazarus mailing list