连接超时问题
2016-04-16 19:36
274 查看
jrhmpt01:/root/async# cat a2.pl use LWP::UserAgent; use utf8; use DBI; use POSIX; use HTTP::Date qw(time2iso str2time time2iso time2isoz); my $ua = LWP::UserAgent->new; $ua->timeout(10); $ua->env_proxy; $ua->agent("Mozilla/8.0"); $time1=time2iso(time()); print "\$time1 is $time1\n"; my $response = $ua->get('https://wenjinbao.winfae.com/'); if ($response->is_success) { print $response->decoded_content; # or whatever }else{print $response->decoded_content; }; $time2=time2iso(time()); print "\$time2 is $time2\n"; print "111111111111111111111111111111111111\n";
jrhmpt01:/root/async# perl a2.pl $time1 is 2016-04-16 19:35:30 500 Can't connect to wenjinbao.winfae.com:443 (connect: Connection timed out) $time2 is 2016-04-16 19:35:33 111111111111111111111111111111111111
相关文章推荐
- 连接超时问题
- Citrix API Hooking
- ADC的引入
- Learn From Code--Kaggle
- iOS开发~CocoaPods使用详细说明
- Spring注入bean报错:Error creating bean with name的网上找不到的解决方案
- 《疯狂的程序猿》 -- 什么是真正的程序猿?
- 第七次作业
- java之正则表达式的使用1
- Bzoj 1562: [NOI2009]变换序列 匈牙利算法,二分图匹配
- 关于错误errno EFAULT:Bad address
- JS部分笔试题
- Catalan数——卡特兰数
- 第七周学习进度条
- oil deposits——深搜
- Cypher(神奇的WITH)
- 199. Binary Tree Right Side View
- VMware安装linux centos7选择桌面系统
- 版本控制——Git 使用笔记,以及Windows搭建Git服务器
- 20135201李辰希 《Linux内核分析》第八周 进程的切换和系统的一般执行过程