Re: How to use TIdIOHandlerSocket in Indy Socket Server.

Giganews Newsgroups
Subject: Re: How to use TIdIOHandlerSocket in Indy Socket Server.
Posted by:  Remy Lebeau \(TeamB\) (no.spam@no.spam.com)
Date: Tue, 17 Jun 2008

"schiva" <schi…@empal.com> wrote in message
news:C8E566FA0B57E340schi…@empal.com...

> I want to use my TMySocketIOHandler which is inherited from
> TIdIOHandlerSocket.

To do that, you will have to derive a new class from TIdServerIOHandler,
override its Accept() method to return an instance of TMySocketIOHandler,
and then assign the TIdServerIOHandler to the server's IOHandler property
before activating the server.

> But when i trying to coding below...
<snip>
> But this code disconnect the clinet program.

As it should be, because you are discarding the previous IOHandler that the
connection was bound to.  You can't change an active IOHandler and still be
able to maintain its connection.

Gambit

Replies

None

In response to

How to use TIdIOHandlerSocket in Indy Socket Server. posted by schiva on Mon, 9 Jun 2008