Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Jun : Re: TidUDPServer question

www.cryer.info
Managed Newsgroup Archive

Re: TidUDPServer question

Subject:Re: TidUDPServer question
Posted by:"Jamie Dale" (j.da..@turboz.net)
Date:Wed, 7 Jun 2006 01:07:57

G'day Remy - How are you today?

> It is not supposed to.  Indy is not an event driven library.
>
> I would not recommend using a timer, though.  You should use a reading
> thread instead.  Have a look at the source code for the TIdTelnet
> component
> for an example.

I'll check that out
>
>> However each thread also has access to the main array of users etc
>> which apparently is not a good idea as the array can become corrupt
>> due to thread collision - I don't know how to get around this..
>
> You need to provide a locking mechanism around the array, such as by using
> a
> critical section or a mutex, in order to access the array in a thread-safe
> manner.

How do I implement this practically? - IE How do I code this?

J

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive