Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > traffic control question

Reply
Thread Tools

traffic control question

 
 
a
Guest
Posts: n/a
 
      08-16-2006
If I want to process the search result, I need to fill out the form, submit
and wait for the reply from the server before I process the search result.
I would like to add some traffic control to it, like writing a loop to wait
for the $response -> is_success, then break the loop. It may need to pass
the token to the OS for receiving the success message. How can I do it?
Thanks

e.g
my $ua = LWP::UserAgent -> new;
my $response = $ua->post(
"website.cgI",
[
textform => "search value"
]
);
#loop wait for is_success
if ($response -> is_success){
print $response -> status_line;
}
#loop


 
Reply With Quote
 
 
 
 
J. Gleixner
Guest
Posts: n/a
 
      08-17-2006
a wrote:
> If I want to process the search result, I need to fill out the form, submit
> and wait for the reply from the server before I process the search result.


How else would you process the result if you don't wait for the reply?

> I would like to add some traffic control to it, like writing a loop to wait
> for the $response -> is_success, then break the loop.


You don't need to "loop", you simply wait for the response. The request
will succeed or fail.

Post the request.
Wait for success/failure.
if success, do something else
else it's a failure, do something else

>It may need to pass
> the token to the OS for receiving the success message. How can I do it?


What the heck is "the token"?

Give us some code with more of what you're wanting to do.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Routing Question - How to send default internet traffic to PIX and VPN traffic from router out internet Evolution Cisco 1 02-27-2007 10:00 PM
FTP outward traffic causing "Unidentified IP traffic" error on ISA 2004 server connected to a PIX quentinhudson@hotmail.com Cisco 0 05-31-2006 11:43 AM
How does typical ISP traffic shaping/bandwidth limiting work ? Do ISP's allow bursty traffic per second ? Skybuck Flying Cisco 0 01-19-2006 08:50 PM
traffic-shaping limit ftp traffic Hypno999 Cisco 5 10-08-2005 07:25 AM
Traffic Log-Legitimate Traffic or Data Mining??? Jeff Computer Security 11 08-10-2004 01:08 AM



Advertisments