李sir_Blog

博客园 首页 联系 订阅 管理
  705 随笔 :: 58 文章 :: 134 评论 :: 193万 阅读

08 2011 档案

摘要:#include<ctime>#include<iostream>#include<boost/bind.hpp>#include<boost/shared_ptr.hpp>#include<boost/enable_shared_from_this.hpp>#include<boost/asio.hpp>usingboost::asio::ip::tcp;std::stringmake_daytime_string(){usingnamespacestd;time_tnow=time(0);returnctime(&am 阅读全文
posted @ 2011-08-29 10:56 李sir 阅读(1628) 评论(0) 推荐(0) 编辑

摘要:#include<ctime>#include<iostream>#include<string>#include<boost/asio.hpp>usingboost::asio::ip::tcp;std::stringmake_daytime_string(){usingnamespacestd;time_tnow=time(0);returnctime(&now);}int_tmain(intargc,_TCHAR*argv[]){try{boost::asio::io_serviceio_service;//新建一个asio::ip 阅读全文
posted @ 2011-08-29 10:13 李sir 阅读(1255) 评论(0) 推荐(0) 编辑

摘要:#include<iostream>#include<boost/array.hpp>#include<boost/asio.hpp>//本程序的目的是访问一个时间同步服务器,我们需要用户指定一个服务器(如time-a.nist.gov),用IP亦可.usingboost::asio::ip::tcp;intmain(intargc,char*argv[])...{try...{if(argc!=2)...{std::cerr<<"Usage:client<host>"<<std::endl;retur 阅读全文
posted @ 2011-08-29 09:28 李sir 阅读(2110) 评论(0) 推荐(0) 编辑

摘要:http://www.boost.org/doc/libs/1_35_0/doc/html/boost_asio/using.html原文http://www.cppblog.com/firectrl/archive/2008/04/20/47638.html翻译 阅读全文
posted @ 2011-08-26 16:12 李sir 阅读(641) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示