Reputation: 12329
I need to check the network-availability of some webservers (HTTP/HTTPS). For that I just need ip/dns and port. But I have a list of URLs. And I would like to use a CPAN-module for that job.
But: - HTTP::Tiny, LWP::UserAgent, ... checks the HTTP-stats, not the network-status. I need to check the 2nd (connection established) and I dont care about the HTTP-header and content.
So any ideas if a HTTP-module also provides a network-status??
Thanks!
Upvotes: 0
Views: 117
Reputation: 385917
You can parse URLs to obtain the host and port using URI module.
Creating a connection can be done using the functions provided by Socket, or using the higher-level class IO::Socket::IP.
Upvotes: 5