opc0de
opc0de

Reputation: 11768

Indy http server questions

I am using indy's http server for a project so i have a few questions:

Thanks.

Upvotes: 3

Views: 609

Answers (1)

TLama
TLama

Reputation: 76693

1. Does the event OnConnect get's executed in a separate thread ?

Yes, the event will get fired as the other events do, even if you are running in a separate thread. The question remains to be answered by you is why. The TIdTCPServer already uses multithreading thus
it can be used in a main thread context (on a form).


2. Can I update the VCL from the OnConnect event ?

Yes, but you will have to use some GUI synchronization practice, such as Synchronize method or e.g. message posting from the separated worker thread to your main one.


3. If MaxNumberConnections is set to 0 what does it exactly mean ?

Zero value assigned to the MaxConnections means there is no limit of connections at one time.

Upvotes: 4

Related Questions