Re: [twsocket] IPv6 implementation details

2010-06-03 Thread Fastream Technologies
Hello,

We use TStringList quicksort/binary search routine I wrote for
caching--works so well that I can recommend.

Also, has anybody tested the IPv6 with listening/server components?

Best Regards,

SZ

On Wed, Jun 2, 2010 at 10:04 PM, Francois PIETTE
francois.pie...@skynet.bewrote:

 How fast/slow this implementation works with thousands of
 concurrent requests is of course untested. One DNS lookup may
 take one or even multiple seconds in the worst case.


 Shouldn't TWSocket have his own internal cache for DNS lookup ? Or maybe
 instead of more complex TWSocket, maybe a component dedicated to DNS lookup
 could have it. As simple strategy inside TWSocket would then be enough for
 most applications while high load applications could benefit from a caching
 component. This is also, imo, good design to offload a specific task to a
 specific class.

 Of course this could be done in each application.

 AVL tree used in SSL is a good candidate to build a cache system.


 --
 francois.pie...@overbyte.be
 http://www.overbyte.be

 --
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] OT: Old vs New (Was RE: Should ICS support IPv6 on W2K?)

2010-06-03 Thread Dave Baxter
Hi.

There is still lots of in-house and some vendor support and
development for 2k among the indipendants.  As just swapping out the
embedded PC is nowhere near as easy as it would be in an office or home
environment.  The lack of EISA slots and Real COM ports, for existing
mega expensive hardware interface adapters being a *Huge* problem with
new PC's, even some of the so called Industrial units.   Resulting in
many such devices do not have any viable replacement, other than from a
stock of existing spares.

The same issues are now being seen with newer machines that have PCI
slots and cards.   Hence older embedded PC's are getting overhauled and
repaired often, not replaced with new.   And of course, with the new
OS's, you often get driver issues with older hardware that is not
supported in the new OS.(Yes, I know some makers will provide them
for you, if you order several machines, but at an outlandish cost.)
USB?  In Industry.  Forget it, it's way too fragile, mechanically and
electrically.

It's all a bit of a nightmare for some of us.

But otherwise, all agreed with.

Have to say though, that often the so called New development on the
new OS's are only to replace existing time served and proven apps and
tools on the older.  Often with less stability and reliability as a
result (but they look pretty!)

Where as in the past a project development team might have stayed in a
company for a few years, nowadays, once the product is passed to
production (hardware or software) the designers seem to run to the four
corners of the earth, result, long term buggy New products, that
replace otherwise reliable and stable older stuff, with near zero chance
of being fixed, so a short product life.   Progress?   Guess someone
makes money out of it...

Anyway, back to my hot oil and HV power supplies!Something just went
Bang!...   No software involvement, other than to reset a DMM that will
have probably been nuked by the spike, and latched up as a result.
(Mk1 digit on power swith!)

Out of curiosity, what is the worldwide take up or penetration of
IPv6 at present?   Anyone know for sure?

Regards.

Dave B.


 -Original Message-
 From: Darin McGee [mailto:da...@basehex.com] 
 Sent: 02 June 2010 16:26
 To: ICS support mailing
 Subject: Re: [twsocket] Should ICS support IPv6 on W2K?
 
 Yes of course but there is no NEW development going on for 
 those systems as it makes no sense.  In other words when it 
 comes time to replace the hardware they are forced into 
 upgrading the programs or run them in a virtual environment.
 
 
 I suspect that data comes from querying browser an or or MS update
 users.
 
 There is still a *Huge* W2k installed base in industry, all those
 machines and systems with it embedded.  Heck, there are still many
 DOS+Win3x based systems still running things in places.  I 
 even know of
 one Comodor PET still used as an environmental chamber 
 controler!   (The
 screen is a little dim these days!)
 
 OK, little of it is connected to the 'net, but much of it is 
 interconnected by LAN (of one form or another) but very 
 little has a web browser that is used for surfing!
 
 Anyway, when or if IPV6 comes about to the masses, we'll 
 probably all be on 128 bit Windows 11 or Linux Kernel V4 or something.
 
 Interesting though, that Win7 is still less prevelant than 
 Vista, no suprise XP is top of the list.
 
 Tin hat and fireproof suit ready.   (Stir stir..)
 
 Dave B.
 
 
  -Original Message-
  From: Zvone [mailto:pha...@gmail.com]
  Sent: 01 June 2010 13:50
  To: ICS support mailing
  Subject: Re: [twsocket] Should ICS support IPv6 on W2K?
  
  Arno, don't bother with Win2000 without service packs support.
  
  See this:
  
  OS usage by market share:
  
  Windows XP - 62.53%
  Windows Vista - 15.26%
  Windows 7 - 12.67%
  Mac OS X 10.6 - 2.34%
  Mac OS X 10.5 - 1.96%
  Linux - 1.13%
  Java ME - 0.73%
  Mac OS X 10.4 - 0.66%
  iPhone - 0.60%
  Windows 2000 - 0.50%
  
  It is slowly moving into Win 9x domain so you can safely move on.
  Good XP and Win 7 support is much more important than figuring out 
  Win2k support.
  Whoever uses it in the application can put this requirement in the 
  readme
  and by the time it is fully tested and IPV4 no longer used, 
 Win2k will
 
  have even less market share if any.
  
  
 --
 To unsubscribe or change your settings for TWSocket mailing 
 list please goto 
 http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be
 
 
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] IPv6 implementation details

2010-06-03 Thread Arno Garrels
Fastream Technologies wrote:
 Hello,
 
 We use TStringList quicksort/binary search routine I wrote for
 caching--works so well that I can recommend.

With many entries all TList-derrived classes are dog-slow 
compared with binary search trees for this purpose!

 
 Also, has anybody tested the IPv6 with listening/server components?

I just commited a few changes. The HTTP client and server should work
now. Please guys, give it a trial and report bugs or provide fixes.

Log: Setter of TCustomWSocket.Addr sets the correct internal socket family
if a host name equals either a valid IPv6 or IPv4 address, overriding
public property SocketFamily. THttpCli added property SocketFamily.

--
Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] IPv6 implementation details

2010-06-03 Thread Fastream Technologies
On Thu, Jun 3, 2010 at 3:43 PM, Arno Garrels arno.garr...@gmx.de wrote:

 Fastream Technologies wrote:
  Hello,
 
  We use TStringList quicksort/binary search routine I wrote for
  caching--works so well that I can recommend.

 With many entries all TList-derrived classes are dog-slow
 compared with binary search trees for this purpose!

We are using Sorted=true; while adding items and no IndexOf() but our
own routine based on searching in a sorted stringlist.


 
  Also, has anybody tested the IPv6 with listening/server components?

 I just commited a few changes. The HTTP client and server should work
 now. Please guys, give it a trial and report bugs or provide fixes.

 Log: Setter of TCustomWSocket.Addr sets the correct internal socket family
 if a host name equals either a valid IPv6 or IPv4 address, overriding
 public property SocketFamily. THttpCli added property SocketFamily.

What happens if one sets 0.0.0.0 as listening IP? Does it cover the
IPv6 interface as well? I mean, our customers are seeking
simplicity--can they listen on both IPv's with single listening
socket?

Best Regards,

SZ
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] IPv6 implementation details

2010-06-03 Thread Arno Garrels
Fastream Technologies wrote:

 We use TStringList quicksort/binary search routine I wrote for
 caching--works so well that I can recommend.
 
 With many entries all TList-derrived classes are dog-slow
 compared with binary search trees for this purpose!
 
 We are using Sorted=true; while adding items and no IndexOf() but our
 own routine based on searching in a sorted stringlist.

Yes that is how I compared a custom TObjectList (sorted, with binary 
search) and my AVL TObjectTree. Tested with 1 Million inserts, I 
decided to kill the test application after one or two minutes
while it was still inserting.

Here are the results of a binary search tree running on an old 
PentiumD:

Tree 1Mil inserts: 578 msec
Tree 1 worst case searches: 0 msec
Tree 10x iter over 1Mil: 625 msec
Tree Clear 1Mil: 375 msec

Iterating over trees is of course slower than over TList.  

 What happens if one sets 0.0.0.0 as listening IP? Does it cover the
 IPv6 interface as well? I mean, our customers are seeking
 simplicity--can they listen on both IPv's with single listening
 socket?

No, either IPv6 or IPv4. If you want to listen on multiple 
interfaces or different IP versions you have to create another 
listening socket as with SSL too. Also mapped IPv4 addresses are not 
supported (yet?)

--
Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] IPv6 implementation details

2010-06-03 Thread Francois PIETTE

We use TStringList quicksort/binary search routine I wrote for
caching--works so well that I can recommend.


With many entries all TList-derrived classes are dog-slow
compared with binary search trees for this purpose!


Confirmed. I recently had a project with such issue. The result where 
extremely bad with a simple TList and really super fast with Arno's AVL 
tree.


--
francois.pie...@overbyte.be
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] (TFtpClient) Parsing list. Help, help.

2010-06-03 Thread newsgate

I greet,

Have the problem and need the help.
I several days already fight from ftp the list.

FTP.HostName:='localhost';
...
FTP.Connect;
FTP.Dir;

And it is well. I will show the result.
-rwx-- 1 user group 311521 May 29 07:33 1.jpg
-rwx-- 1 user group 311521 May 29 07:38 2.jpg
drwx-- 1 user group  0 Jun 03 16:13 test1


I can read name the file.
1.jpg is okay.

I can read if this is file or directory.
'd' directory and '-' file is okay.

I can read the size of the file.
FTP.HostFileName:='1.jpg';
if (FTP.Size) then FTP.Size is okay.

I can not read the date of file ' May 29 07:33'
should be '2010-05-29 07:33:00' how do this???
Help please... crazy...


I looked in 'elists.org' but not find.


--
Piotr Nowak
Poland

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] (TFtpClient) Parsing list. Help, help.

2010-06-03 Thread Eric-Lionel Rault

And it is well. I will show the result.
-rwx-- 1 user group 311521 May 29 07:33 1.jpg
-rwx-- 1 user group 311521 May 29 07:38 2.jpg
drwx-- 1 user group  0 Jun 03 16:13 test1

I can not read the date of file ' May 29 07:33'
should be '2010-05-29 07:33:00' how do this???


use FTPLISTEINFO below
liglisteFTP represent one line like  '-rwx-- 1 user group 311521 
May 29 07:33 1.jpg'




function AJUSTELIG(chainex:String;lgmax:integer;bourrage:Byte):String;
//retourne une chaine contenant exactement lgmax caractères
//si chainex est supérieure à lgmax, chainex est tronquée
//si chainex est inférieure on y rajoute les caractères de bourrage
//bourrage=0 ou 3 : espaces derrière
// 1 espaces devant
// 2 zéros derrière
// 3 zéros devant
var lgchaine, cptcar:integer;
   chainetmp:string;
begin
If lgmax = 0 Then chainex := '' else
 begin
   lgchaine := Length(chainex);
   If lgchaine  lgmax Then
 begin
   chainetmp:='';
   for cptcar:=1 to lgmax do chainetmp:=chainetmp+chainex[cptcar];
   chainex:=chainetmp;
 end
 else
   begin
 If lgchaine  lgmax Then
   begin
 Case bourrage of
  1:while length(chainex)lgmax do chainex:=#32+chainex;
  2:while length(chainex)lgmax do chainex:=chainex+'0';
  3:while length(chainex)lgmax do chainex:='0'+chainex;
  else while length(chainex)lgmax do chainex:=chainex+#32;
 End;
   end;
   end;
 end;
result := chainex;
end;

function FTPLISTEINFO(NumChamp:byte;liglisteFTP:string):string;
//retourne le champ de liglisteFTP
//note1 : retourne '#' si NumChamp incorrect ou champ non trouvé
//note2 : si NumChamp=5 : retourne '#' si la ligne est un répertoire
//NumChamp=1 PRIV
//=2 IND
//=3 NOM1
//=4 NOM2
//=5 TAILLE
//=6 MOIS converti au format 01 à 12 : retourne toujours 2 chiffres
//=7 JOUR : retourne toujours 2 chiffres
//=8 HEUREMINUTE : retire le ':' et retourne toujours 4 chiffres
//=9 NOMFIC
var lgcar,cptcar,cptchamp:byte;
   champx,champret,moisx,heux,minx :string;
   fin,espace,heure:boolean;
   moisl,jol,heul,minl:longint;
begin
 champret:='#';
 lgcar:=length(liglisteFTP);
 if ((lgcar0)and(numchamp=5)) then
   begin
 if liglisteftp[1]='d' then lgcar:=0;
   end;
 if ((lgcar0)and (NumChamp0)and(numchamp=9)) then
   begin
 cptchamp:=1;
 cptcar:=0;
 champx:='';
 fin:=false;
 espace:=false;
 repeat
   inc(cptcar);
   case liglisteFTP[cptcar] of
 #32 :if cptchamp9 then
begin
  if espace=false then
begin
  if cptchamp=NumChamp then fin:=true else
begin
  cptchamp:=cptchamp+1;
  champx:='';
end;
end;
  espace:=true;
end
else
  begin
//le nom peut comporter des espaces
champx:=champx+#32;
  end;
 else
   begin
 champx:=champx+liglisteFTP[cptcar];
 espace:=false;
   end;
   end;
   if cptcar=lgcar then fin:=true;
 until (fin);
 if champx'' then
   begin
 if cptchamp=NumChamp then
   begin
 case numchamp of
   6:begin
   moisl:=0;
   moisx:=MAJUS(champx);//passer en majuscules
   if moisx='JAN' then moisl:=1
 else if moisx='FEB' then moisl:=2
   else if moisx='MAR' then moisl:=3
 else if moisx='APR' then moisl:=4
   else if moisx='MAY' then moisl:=5
 else if moisx='JUN' then moisl:=6
   else if moisx='JUL' then moisl:=7
 else if moisx='AUG' then moisl:=8
   else if moisx='SEP' then moisl:=9
 else if moisx='OCT' then moisl:=10
   else if moisx='NOV' then moisl:=11
 else if moisx='DEC' then 
moisl:=12;

   if moisl0 then champret:=AJUSTELIG(N(moisl),2,3);
 end;
   7:begin
   jol:=T(champx);
   if ((jol0) and (jol=31)) then 
champret:=AJUSTELIG(N(jol),2,3);

 end;
   8:begin
   heux:='';
   minx:='';
   heure:=true;
   for cptcar:=1 to length(champx) do
 begin
   if champx[cptcar]=':' then heure:=false
 else
   begin
 if heure=true then