Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Simple question

13 views
Skip to first unread message

Alan

unread,
Aug 31, 2004, 11:48:21 PM8/31/04
to
I placed a TIdTCPClient on a form in one application, set the host to local
host and port to 1050.
Then in another application, I placed a TIdTCPServer on a form in one
application, set the default port to 1050.

I started the server program and then the client program, but when I tried
to execute the Client1.connect method, I got an exception in the client
program of message:
raised exception class EIdSocketError with message 'Socket Error # 10061
Connection refused'.

I thought I did not set the server Active property to TRUE. I stopped both
programs, set the TIdTCPServer 's Active property to True and restarted the
server program, then the client program.
Now I got another error:
'EIdNoExecuteSpecified with message 'No execute handler found.''


Martin James

unread,
Sep 1, 2004, 3:00:33 AM9/1/04
to
> I thought I did not set the server Active property to TRUE. I stopped
both
> programs, set the TIdTCPServer 's Active property to True and restarted
the
> server program, then the client program.
> Now I got another error:
> 'EIdNoExecuteSpecified with message 'No execute handler found.''

Is there an onExecute handler on the server?

Rgds,
Martin


Remy Lebeau (TeamB)

unread,
Sep 1, 2004, 1:36:43 PM9/1/04
to

"Alan" <NOSPAMal...@yahoo.com.au> wrote in message
news:41354684$1...@newsgroups.borland.com...

> I started the server program and then the client program,
> but when I tried to execute the Client1.connect method, I
> got an exception in the client program of message: raised
> exception class EIdSocketError with message 'Socket
> Error # 10061 Connection refused'.

The server was not active at the time.

> I thought I did not set the server Active property to TRUE.
> I stopped both programs, set the TIdTCPServer 's Active
> property to True and restarted the server program, then the
> client program. Now I got another error:
> 'EIdNoExecuteSpecified with message 'No execute handler found.''

You did not assign an event handler to the server's OnExecute event. You
must do that, unless you are going to use the server's CommandHandlers
collection instead. Otherwise, the OnExecute event is where all of your
work needs to go.


Gambit


0 new messages