Sending a HTTP request from within a plugin

Jeremy James jbj at
Thu Jul 26 09:30:14 UTC 2007

Robby Dermody wrote:
> I was looking at the source and it looks like I could use Danga::Socket
> directly for this, however given the fact that these HTTP requests could be
> going out quite frequently (and all to the same host), I'd probably want to
> make the requests on a persistent connection (using KeepAlives).

Depending on the precise application design and what your error
conditions are (what happens if the other host doesn't return a 200?),
I'd personally consider sending UDP packets instead - should be faster
to send, and less coding required! (*)


(*) My perl was never very good, but perhaps something like - this
probably uses both IO::Socket and Danga::Socket:

$udp_sock ||= IO::Socket::INET->new(Proto=>'udp');
$udp_sock->send("SOME DATA", 0, \

More information about the perlbal mailing list