Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Mar : Re: TidCookieManager questions (threads)
| Subject: | Re: TidCookieManager questions (threads) |
| Posted by: | "dk_sz" (dk_..@hotmail.com) |
| Date: | Fri, 23 Mar 2007 17:36:43 |
> Do I need to maintain both the collection itself
> and FCookieListByDomain? (The latter does protect
> against duplicates, e.g. in TIdCookies.AddCookie)
Just a quick example of that both are used:
procedure TIdCookieManager.AddCookie(ACookie, AHost: String);
Var
LCookie: TIdCookieRFC2109;
begin
LCookie := FCookieCollection.Add;
DoAdd(LCookie, ACookie, AHost);
end;
DoAdd calls DoOnNewCookie (event)
and ads it to FCookieListByDomain
So when copying? Do I need to copy the collection...
And then patch FCookieListByDomain ?
best regards
Thomas Schulz