Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Jan : Re: Looking for very basic indy 10 server examples
| Subject: | Re: Looking for very basic indy 10 server examples |
| Posted by: | "Mark Smith" (marksmi..@jungle-monkey.com) |
| Date: | Thu, 24 Jan 2008 22:25:20 |
Remy Lebeau (TeamB) wrote:
> "Mark Smith" <marksmith@jungle-monkey.com> wrote in message
> news:4797f6e8@newsgroups.borland.com...
>
>> I'm trying to learn how to use indy. A lot of the examples I
>> can find online assume I am embedding the indy component
>> within a form.
>
> They work exactly the same whether you drop them on a TForm or TDataModule
> at design-time, or instantiate them dynamically in your run-time code
> instead.
>
>> I just want a simple console application to be able to act as a server.
>
> Given the code you have shown, your console app is going to terminate right
> away. You are creating the server object fine, but then you let the DPR
> code exit without waiting on any kind of event or other termination
> triggers. You need to perform some kind of waiting in order for the console
> process to stay running for any length of time.
>
>> I can't even get as far as creating the server:
>
> Yes, you are. You are just not doing anything with it.
>
I understand that I need to suspend the main thread. The problem was
that it was not even compiling... I was using idtcpserver.create();
instead of Tidtcpserver.create();
Anyway thanks for the examples.
Mark
none