Discussion:
TIdBlockCipherIntercept (Indy10)
(too old to reply)
Ben Davies
2007-05-17 06:54:08 UTC
Permalink
I'm trying to use an intercept to implement encryption between a client
and server. its straightforward to descend from the
TIdBlockCipherIntercept for a TCPclient, but at the server end, it appears
to need an intercept descended from TIdServerIntercept, rather than
TIdConnectionIntercept, which the TIdBlockCipherIntercept is derived from.

seems a bit odd to me that Indy implements the client intercept, but not
the server intercept. what use is half a solution?

is there no TIdServerBlockCipherIntercept? or am I missing something here?

cheers,

ben



--- posted by geoForum on http://delphi.newswhat.com
Remy Lebeau (TeamB)
2007-05-17 07:21:31 UTC
Permalink
Post by Ben Davies
I'm trying to use an intercept to implement encryption between
a client and server. its straightforward to descend from the
TIdBlockCipherIntercept for a TCPclient, but at the server end,
it appears to need an intercept descended from TIdServerIntercept,
rather than TIdConnectionIntercept, which the
TIdBlockCipherIntercept is derived from.
You can assign your TIdBlockCipherIntercept dynamically in the
OnConnect event, ie:

procedure TForm1.IdTCPServer1Connect(AThread: TIdPeerThread);
begin
AThread.Connection.Intercept :=
TIdBlockCipherIntercept.Create(AThread.Connection);
// configure the Intercept as needed...
end;
Post by Ben Davies
seems a bit odd to me that Indy implements the client intercept,
but not the server intercept.
Most of the Intercepts don't have server-side classes implemented yet.
And in any case, all the TIdServerIntercept does is essentially what
the code above does, just automated.


Gambit

Loading...