Asynchronous HTTP Request using specific portsby Adamba (Sexton)
|on Apr 04, 2013 at 10:32 UTC||Need Help??|
Adamba has asked for the
wisdom of the Perl Monks concerning the following question:
I'm trying to write a script that will HTTP get some urls but with specific source ports.
The idea of using a specific port is to mark with dscp my packets
I've tried to use WWW::Curl::Multi and AnyEvent::HTTP, but i'm always ending with the same problem, the socket is hanging with TIME_WAIT, and I can't reuse the source port that the socket is stuck with, i'm getting this error msg: bind failed with errno 98: Address already in use
The last option that i'm trying is using IO::Socket::INET with Blocking 0, but I'm having trouble with my code:
Where have I got wrong?
Thanks in advance, Adam