Paul wrote: > I get an 'Invalid class typecast' error in HttpServClientConnect event.
Have you assigned TMyHttpConnection to property ClientClass? Arno Garrels > Is there anything changed between ICS V3 and V5 ? > The same worked on V3 > > > Paul > > > procedure TForm1.HttpServClientConnect(Sender, Client: TObject; > Error: Word); > var > ClientCnx: TMyHttpConnection; > begin > ClientCnx:= Client as TMyHttpConnection; > end; > > TMyHttpConnection = class(THttpConnection) > protected > ClientID : integer; > ConnectionStart : int64; > public > procedure AnswerString(var Flags : THttpGetFlag; > const Status : String; > const ContType : String; > const Header : String; > const Body : String); override; > > constructor Create(AOwner: TComponent); override; > destructor Destroy; override; > end; > > > constructor TMyHttpConnection.Create(AOwner: TComponent); > begin > inherited create(AOwner); > ComponentOptions := ComponentOptions + [wsoNoReceiveloop]; > ClientID := InterlockedIncrement(NClientID); > end; -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be