[fpc-pascal]Thread + Inet

Peter Vreman peter at freepascal.org
Thu Jan 4 19:36:16 CET 2001


>I have a little problem. I want to write a multithreaded server.
>So I create a server socket (So I try, but I not found some
>documentation), after I wait the client connection (in an unlimited
>cycle), and I create a new thread (next problem: How I create a new thread
>without array (I don't want controlling), (Example in java, I create a
>class from the Thread class and I create a dynamic thread (new
>thread(parameter))), so I give the socket to the thread (I think I use the
>constructor), and wait the nex connection (Don't need clear the socket
>variables, before I waiting the next client?)

There is a very basic implementation of the TThread class available in the 
FCL. Maybe it's enough for your program to run the socket functions with. 
But be carefull with other things as the RTL itself isn't multithreaded 
aware yet.


Peter





More information about the fpc-pascal mailing list