For Programmers: Free Programming Magazines  


Home > Archive > AWK > December 2004 > awk, tcp/ip, http and time problem...









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author awk, tcp/ip, http and time problem...
Koriolan

2004-12-03, 3:56 pm

Mine script :
....
print strftime("%F %T ")"Send www..." ;

print "POST /?logowanie=1&dsc=ASC HTTP/1.1" |& ;
...
print "Content-Length: 49" |& "/inet/tcp/0/www.cennik.incom.pl/80";
printf "\n" |& "/inet/tcp/0/www.cennik.incom.pl/80";
...
print "" |& "/inet/tcp/0/www.cennik.incom.pl/80";

###
# Odczytywanie reading

print strftime("%F %T ")"Odczytywanie ..." ;

status = ( "/inet/tcp/0/www.cennik.incom.pl/80" |& getline linia );
while ( status > 0 ) {
system("sleep 1");
if ( czy_mon > 0 ) printf "." ;
status = ( "/inet/tcp/0/www.cennik.incom.pl/80" |& getline linia );
}
.....

>
>2004-12-03 17:59:30 Send www ...
>2004-12-03 17:59:35 Odczytywanie ....
>2004-12-03 17:59:50 Status : 0


The problem is 'time' ... to loonnng :-(.

15 second read or write :-(

60 page www = 30 minuts (write - read) :-(

Can somebody do it better ?

Koriolan
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com