搜索: Search Search Titles Search Full Text
更多操作 源码 打印视图 输出Docbook格式 删除缓存 ------------ 拼写检查 相似网页 本站地图 ------------ 改名 删除 ------------ 我的网页 订阅 ------------ 删除垃圾广告 网页打包 ------------ Visual Site Map
BOOST 绝对实用手册(写作中!!!!!!!)
目录
1. 序言
2. 编译:VC2005注意
3. Asio 网络库
1. 网络库:VC2005注意
2. 同步Timer
3. 异步Timer
4. 回调函数的参数
5. 成员函数作为回调函数
6. 多线程回调同步
7. TCP客户端:对准时间
8. TCP同步时间服务器
张沈鹏 电子科技大学大三 生物医学工程
- -- Any Question,Please Email To zsp007@gmail.com
更新:2006.10 beta
参考:BOOST文档
- -- 欢迎转载,但请保留引用网址以获得更新
1. 序言
现在学的东西很容易忘记,写这篇文章的目的是能让我在需要时快速找回当时的感觉. Let's BOOST THE WORLD .
2. 编译:VC2005注意
在 属性->C/C++->预处理器->预处理定义 中加入
_CRT_SECURE_NO_DEPRECATE;
来屏蔽不必要的警告
3. Asio 网络库
Boost.Asio是利用当代C++的先进方法,跨平台,异步I/O模型的C++网络库.
3.1. 网络库:VC2005注意
在 属性->C/C++->命令行 中加入
-DBOOST_REGEX_NO_LIB
来防止自动连接.
3.2. 同步Timer
本章介绍asio如何在定时器上进行阻塞等待(blocking wait).
实现,我们包含必要的头文件.
所有的asio类可以简单的通过include "asio.hpp"来调用.
#include <iostream>
#include <boost/asio.hpp>
#include <boost/asio.hpp>
此外,这个示例用到了timer,我们还要包含Boost.Date_Time的头文件来控制时间.
#include <boost/date_time/posix_time/posix_time.hpp>
使用asio至少需要一个boost::asio::io_service对象.该类提供了访问I/O的功能.我们首先在main函数中声明它.
int main()
{
boost::asio::io_service io;
{
boost::asio::io_service io;
下 一步我们声明boost::asio::deadline_timer对象.这个asio的核心类提供I/O的功能(这里更确切的说是定时功能),总是把 一个io_service对象作为他的第一个构造函数,而第二个构造函数的参数设定timer会在5秒后到时(expired).
boost::asio::deadline_timer t(io, boost::posix_time::seconds(5));
这个简单的示例中我们演示了定时器上的一个阻塞等待.就是说,调用boost::asio::deadline_timer::wait()的在创建后5秒内(注意:不是等待开始后),timer到时之前不会返回任何值.
一个deadline_timer只有两种状态:到时,未到时.
如果boost::asio::deadline_timer::wait()在到时的timer对象上调用,会立即return.
t.wait();
最后,我们输出理所当然的"Hello, world!"来演示timer到时了.
std::cout << "Hello, world!\n";
return 0;
}
return 0;
}
完整的代码:
#include <iostream>
#include <boost/asio.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
int main()
{
boost::asio::io_service io;
boost::asio::deadline_timer t(io, boost::posix_time::seconds(5));
t.wait();
std::cout << "Hello, world!\n";
return 0;
}
#include <boost/asio.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
int main()
{
boost::asio::io_service io;
boost::asio::deadline_timer t(io, boost::posix_time::seconds(5));
t.wait();
std::cout << "Hello, world!\n";
return 0;
}
3.3. 异步Timer
#include <iostream>
#include <asio.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <asio.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
asio的异步函数会在一个异步操作完成后被回调.这里我们定义了一个将被回调的函数.
void print(const asio::error& /*e*/)
{
std::cout << "Hello, world!\n";
}
int main()
{
asio::io_service io;
asio::deadline_timer t(io, boost::posix_time::seconds(5));
{
std::cout << "Hello, world!\n";
}
int main()
{
asio::io_service io;
asio::deadline_timer t(io, boost::posix_time::seconds(5));
这里我们调用asio::deadline_timer::async_wait()来异步等待
t.async_wait(print);
最后,我们必须调用asio::io_service::run().
asio库只会调用那个正在运行的asio::io_service::run()的回调函数.
如果asio::io_service::run()不被调用,那么回调永远不会发生.
asio::io_service::run()会持续工作到点,这里就是timer到时,回调完成.
别 忘了在调用 asio::io_service::run()之前设置好io_service的任务.比如,这里,如果我们忘记先调用 asio::deadline_timer::async_wait()则asio::io_service::run()会在瞬间return.
io.run();
return 0;
}
return 0;
}
完整的代码:
#include <iostream>
#include <asio.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
void print(const asio::error& /*e*/)
{
std::cout << "Hello, world!\n";
}
int main()
{
asio::io_service io;
asio::deadline_timer t(io, boost::posix_time::seconds(5));
t.async_wait(print);
io.run();
return 0;
}
#include <asio.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
void print(const asio::error& /*e*/)
{
std::cout << "Hello, world!\n";
}
int main()
{
asio::io_service io;
asio::deadline_timer t(io, boost::posix_time::seconds(5));
t.async_wait(print);
io.run();
return 0;
}
3.4. 回调函数的参数
这里我们将每秒回调一次,来演示如何回调函数参数的含义
#include <iostream>
#include <asio.hpp>
#include <boost/bind.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <asio.hpp>
#include <boost/bind.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
首先,调整一下timer的持续时间,开始一个异步等待.显示,回调函数需要访问timer来实现周期运行,所以我们再介绍两个新参数
- 指向timer的指针
- 一个int*来指向计数器
void print(const asio::error& /*e*/,
asio::deadline_timer* t, int* count)
{
asio::deadline_timer* t, int* count)
{
我 们打算让这个函数运行6个周期,然而你会发现这里没有显式的方法来终止io_service.不过,回顾上一节,你会发现当 asio::io_service::run()会在所有任务完成时终止.这样我们当计算器的值达到5时(0为第一次运行的值),不再开启一个新的异步等 待就可以了.
if (*count < 5)
{
std::cout << *count << "\n";
++(*count);
{
std::cout << *count << "\n";
++(*count);
然后,我们推迟的timer的终止时间.通过在原先的终止时间上增加延时,我们可以确保timer不会在处理回调函数所需时间内的到期.
(原 文:By calculating the new expiry time relative to the old, we can ensure that the timer does not drift away from the whole-second mark due to any delays in processing the handler.)
t->expires_at(t->expires_at() + boost::posix_time::seconds(1));
然后我们开始一个新的同步等待.如您所见,我们用把print和他的多个参数用boost::bind函数合成一个的形为void(const asio::error&)回调函数(准确的说是function object).
在 这个例子中, boost::bind的asio::placeholders::error参数是为了给回调函数传入一个error对象.当进行一个异步操作,开始 boost::bind时,你需要使用它来匹配回调函数的参数表.下一节中你会学到回调函数不需要error参数时可以省略它.
t->async_wait(boost::bind(print,
asio::placeholders::error, t, count));
}
}
int main()
{
asio::io_service io;
int count = 0;
asio::deadline_timer t(io, boost::posix_time::seconds(1));
asio::placeholders::error, t, count));
}
}
int main()
{
asio::io_service io;
int count = 0;
asio::deadline_timer t(io, boost::posix_time::seconds(1));
和上面一样,我们再一次使用了绑定asio::deadline_timer::async_wait()
t.async_wait(boost::bind(print,
asio::placeholders::error, &t, &count));
io.run();
asio::placeholders::error, &t, &count));
io.run();
在结尾,我们打印出的最后一次没有设置timer的调用的count的值
std::cout << "Final count is " << count << "\n";
return 0;
}
return 0;
}
完整的代码:
#include <iostream>
#include <asio.hpp>
#include <boost/bind.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
void print(const asio::error& /*e*/,
asio::deadline_timer* t, int* count)
{
if (*count < 5)
{
std::cout << *count << "\n";
++(*count);
t->expires_at(t->expires_at() + boost::posix_time::seconds(1));
t->async_wait(boost::bind(print,
asio::placeholders::error, t, count));
}
}
int main()
{
asio::io_service io;
int count = 0;
asio::deadline_timer t(io, boost::posix_time::seconds(1));
t.async_wait(boost::bind(print,
asio::placeholders::error, &t, &count));
io.run();
std::cout << "Final count is " << count << "\n";
return 0;
}
#include <asio.hpp>
#include <boost/bind.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
void print(const asio::error& /*e*/,
asio::deadline_timer* t, int* count)
{
if (*count < 5)
{
std::cout << *count << "\n";
++(*count);
t->expires_at(t->expires_at() + boost::posix_time::seconds(1));
t->async_wait(boost::bind(print,
asio::placeholders::error, t, count));
}
}
int main()
{
asio::io_service io;
int count = 0;
asio::deadline_timer t(io, boost::posix_time::seconds(1));
t.async_wait(boost::bind(print,
asio::placeholders::error, &t, &count));
io.run();
std::cout << "Final count is " << count << "\n";
return 0;
}
3.5. 成员函数作为回调函数
本例的运行结果和上一节类似
#include <iostream>
#include <boost/asio.hpp>
#include <boost/bind.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/asio.hpp>
#include <boost/bind.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
我们先定义一个printer类
class printer
{
public:
{
public:
构造函数有一个io_service参数,并且在初始化timer_时用到了它.用来计数的count_这里同样作为了成员变量
printer(boost::asio::io_service& io)
: timer_(io, boost::posix_time::seconds(1)),
count_(0)
{
: timer_(io, boost::posix_time::seconds(1)),
count_(0)
{
boost::bind 同样可以出色的工作在成员函数上.众所周知,所有的非静态成员函数都有一个隐式的this参数,我们需要把this作为参数bind到成员函数上.和上一 节类似,我们再次用bind构造出void(const boost::asio::error&)形式的函数.
注意,这里没有指定boost::asio::placeholders::error占位符,因为这个print成员函数没有接受一个error对象作为参数.
timer_.async_wait(boost::bind(&printer::print, this));
}
}
在类的折构函数中我们输出最后一次回调的conut的值
~printer()
{
std::cout << "Final count is " << count_ << "\n";
}
{
std::cout << "Final count is " << count_ << "\n";
}
print函数于上一节的十分类似,但是用成员变量取代了参数.
void print()
{
if (count_ < 5)
{
std::cout << count_ << "\n";
++count_;
timer_.expires_at(timer_.expires_at() + boost::posix_time::seconds(1));
timer_.async_wait(boost::bind(&printer::print, this));
}
}
private:
boost::asio::deadline_timer timer_;
int count_;
};
{
if (count_ < 5)
{
std::cout << count_ << "\n";
++count_;
timer_.expires_at(timer_.expires_at() + boost::posix_time::seconds(1));
timer_.async_wait(boost::bind(&printer::print, this));
}
}
private:
boost::asio::deadline_timer timer_;
int count_;
};
现在main函数清爽多了,在运行io_service之前只需要简单的定义一个printer对象.
int main()
{
boost::asio::io_service io;
printer p(io);
io.run();
return 0;
}
{
boost::asio::io_service io;
printer p(io);
io.run();
return 0;
}
完整的代码:
#include <iostream>
#include <boost/asio.hpp>
#include <boost/bind.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
class printer
{
public:
printer(boost::asio::io_service& io)
: timer_(io, boost::posix_time::seconds(1)),
count_(0)
{
timer_.async_wait(boost::bind(&printer::print, this));
}
~printer()
{
std::cout << "Final count is " << count_ << "\n";
}
void print()
{
if (count_ < 5)
{
std::cout << count_ << "\n";
++count_;
timer_.expires_at(timer_.expires_at() + boost::posix_time::seconds(1));
timer_.async_wait(boost::bind(&printer::print, this));
}
}
private:
boost::asio::deadline_timer timer_;
int count_;
};
int main()
{
boost::asio::io_service io;
printer p(io);
io.run();
return 0;
}
#include <boost/asio.hpp>
#include <boost/bind.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
class printer
{
public:
printer(boost::asio::io_service& io)
: timer_(io, boost::posix_time::seconds(1)),
count_(0)
{
timer_.async_wait(boost::bind(&printer::print, this));
}
~printer()
{
std::cout << "Final count is " << count_ << "\n";
}
void print()
{
if (count_ < 5)
{
std::cout << count_ << "\n";
++count_;
timer_.expires_at(timer_.expires_at() + boost::posix_time::seconds(1));
timer_.async_wait(boost::bind(&printer::print, this));
}
}
private:
boost::asio::deadline_timer timer_;
int count_;
};
int main()
{
boost::asio::io_service io;
printer p(io);
io.run();
return 0;
}
3.6. 多线程回调同步
本节演示了使用boost::asio::strand在多线程程序中进行回调同步(synchronise).
先 前的几节阐明了如何在单线程程序中用boost::asio::io_service::run()进行同步.如您所见,asio库确保 仅当 当前线程调用boost::asio::io_service::run()时产生回调.显然,仅在一个线程中调用 boost::asio::io_service::run() 来确保回调是适用于并发编程的.
一个基于asio的程序最好是从单线程入手,但是单线程有如下的限制,这一点在服务器上尤其明显:
- 当回调耗时较长时,反应迟钝.
- 在多核的系统上无能为力
如果你发觉你陷入了这种困扰,可以替代的方法是建立一个boost::asio::io_service::run()的线程池.然而这样就允许回调函数并发执行.所以,当回调函数需要访问一个共享,线程不安全的资源时,我们需要一种方式来同步操作.
#include <iostream>
#include <boost/asio.hpp>
#include <boost/thread.hpp>
#include <boost/bind.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/asio.hpp>
#include <boost/thread.hpp>
#include <boost/bind.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
在上一节的基础上我们定义一个printer类,此次,它将并行运行两个timer
class printer
{
public:
{
public:
除了声明了一对boost::asio::deadline_timer,构造函数也初始化了类型为boost::asio::strand的strand_成员.
boost::asio::strand 可以分配的回调函数.它保证无论有多少线程调用了boost::asio::io_service::run(),下一个回调函数仅在前一个回调函数完成 后开始,当然回调函数仍然可以和那些不使用boost::asio::strand分配,或是使用另一个boost::asio::strand分配的回 调函数一起并发执行.
printer(boost::asio::io_service& io)
: strand_(io),
timer1_(io, boost::posix_time::seconds(1)),
timer2_(io, boost::posix_time::seconds(1)),
count_(0)
{
: strand_(io),
timer1_(io, boost::posix_time::seconds(1)),
timer2_(io, boost::posix_time::seconds(1)),
count_(0)
{
当 一个异步操作开始时,用boost::asio::strand来 "wrapped(包装)"回调函数.boost::asio::strand::wrap()会返回一个由boost::asio::strand分配 的新的handler(句柄),这样,我们可以确保它们不会同时运行.
timer1_.async_wait(strand_.wrap(boost::bind(&printer::print1, this)));
timer2_.async_wait(strand_.wrap(boost::bind(&printer::print2, this)));
}
~printer()
{
std::cout << "Final count is " << count_ << "\n";
}
timer2_.async_wait(strand_.wrap(boost::bind(&printer::print2, this)));
}
~printer()
{
std::cout << "Final count is " << count_ << "\n";
}
多线程程序中,回调函数在访问共享资源前需要同步.这里共享资源是std::cout 和count_变量.
void print1()
{
if (count_ < 10)
{
std::cout << "Timer 1: " << count_ << "\n";
++count_;
timer1_.expires_at(timer1_.expires_at() + boost::posix_time::seconds(1));
timer1_.async_wait(strand_.wrap(boost::bind(&printer::print1, this)));
}
}
void print2()
{
if (count_ < 10)
{
std::cout << "Timer 2: " << count_ << "\n";
++count_;
timer2_.expires_at(timer2_.expires_at() + boost::posix_time::seconds(1));
timer2_.async_wait(strand_.wrap(boost::bind(&printer::print2, this)));
}
}
private:
boost::asio::strand strand_;
boost::asio::deadline_timer timer1_;
boost::asio::deadline_timer timer2_;
int count_;
};
{
if (count_ < 10)
{
std::cout << "Timer 1: " << count_ << "\n";
++count_;
timer1_.expires_at(timer1_.expires_at() + boost::posix_time::seconds(1));
timer1_.async_wait(strand_.wrap(boost::bind(&printer::print1, this)));
}
}
void print2()
{
if (count_ < 10)
{
std::cout << "Timer 2: " << count_ << "\n";
++count_;
timer2_.expires_at(timer2_.expires_at() + boost::posix_time::seconds(1));
timer2_.async_wait(strand_.wrap(boost::bind(&printer::print2, this)));
}
}
private:
boost::asio::strand strand_;
boost::asio::deadline_timer timer1_;
boost::asio::deadline_timer timer2_;
int count_;
};
main函数中boost::asio::io_service::run()在两个线程中被调用:主线程,一个boost::thread线程.
正如单线程中那样,并发的boost::asio::io_service::run()会一直运行直到完成任务.后台的线程将在所有异步线程完成后终结.
int main()
{
boost::asio::io_service io;
printer p(io);
boost::thread t(boost::bind(&boost::asio::io_service::run, &io));
io.run();
t.join();
return 0;
}
{
boost::asio::io_service io;
printer p(io);
boost::thread t(boost::bind(&boost::asio::io_service::run, &io));
io.run();
t.join();
return 0;
}
完整的代码:
#include <iostream>
#include <boost/asio.hpp>
#include <boost/thread.hpp>
#include <boost/bind.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
class printer
{
public:
printer(boost::asio::io_service& io)
: strand_(io),
timer1_(io, boost::posix_time::seconds(1)),
timer2_(io, boost::posix_time::seconds(1)),
count_(0)
{
timer1_.async_wait(strand_.wrap(boost::bind(&printer::print1, this)));
timer2_.async_wait(strand_.wrap(boost::bind(&printer::print2, this)));
}
~printer()
{
std::cout << "Final count is " << count_ << "\n";
}
void print1()
{
if (count_ < 10)
{
std::cout << "Timer 1: " << count_ << "\n";
++count_;
timer1_.expires_at(timer1_.expires_at() + boost::posix_time::seconds(1));
timer1_.async_wait(strand_.wrap(boost::bind(&printer::print1, this)));
}
}
void print2()
{
if (count_ < 10)
{
std::cout << "Timer 2: " << count_ << "\n";
++count_;
timer2_.expires_at(timer2_.expires_at() + boost::posix_time::seconds(1));
timer2_.async_wait(strand_.wrap(boost::bind(&printer::print2, this)));
}
}
private:
boost::asio::strand strand_;
boost::asio::deadline_timer timer1_;
boost::asio::deadline_timer timer2_;
int count_;
};
int main()
{
boost::asio::io_service io;
printer p(io);
boost::thread t(boost::bind(&boost::asio::io_service::run, &io));
io.run();
t.join();
return 0;
}
#include <boost/asio.hpp>
#include <boost/thread.hpp>
#include <boost/bind.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
class printer
{
public:
printer(boost::asio::io_service& io)
: strand_(io),
timer1_(io, boost::posix_time::seconds(1)),
timer2_(io, boost::posix_time::seconds(1)),
count_(0)
{
timer1_.async_wait(strand_.wrap(boost::bind(&printer::print1, this)));
timer2_.async_wait(strand_.wrap(boost::bind(&printer::print2, this)));
}
~printer()
{
std::cout << "Final count is " << count_ << "\n";
}
void print1()
{
if (count_ < 10)
{
std::cout << "Timer 1: " << count_ << "\n";
++count_;
timer1_.expires_at(timer1_.expires_at() + boost::posix_time::seconds(1));
timer1_.async_wait(strand_.wrap(boost::bind(&printer::print1, this)));
}
}
void print2()
{
if (count_ < 10)
{
std::cout << "Timer 2: " << count_ << "\n";
++count_;
timer2_.expires_at(timer2_.expires_at() + boost::posix_time::seconds(1));
timer2_.async_wait(strand_.wrap(boost::bind(&printer::print2, this)));
}
}
private:
boost::asio::strand strand_;
boost::asio::deadline_timer timer1_;
boost::asio::deadline_timer timer2_;
int count_;
};
int main()
{
boost::asio::io_service io;
printer p(io);
boost::thread t(boost::bind(&boost::asio::io_service::run, &io));
io.run();
t.join();
return 0;
}
3.7. TCP客户端:对准时间
#include <iostream>
#include <boost/array.hpp>
#include <boost/asio.hpp>
#include <boost/array.hpp>
#include <boost/asio.hpp>
本程序的目的是访问一个时间同步服务器,我们需要用户指定一个服务器(如time-nw.nist.gov),用IP亦可.
(译者注:日期查询协议,这种时间传输协议不指定固定的传输格式,只要求按照ASCII标准发送数据。)
using boost::asio::ip::tcp;
int main(int argc, char* argv[])
{
try
{
if (argc != 2)
{
std::cerr << "Usage: client <host>" << std::endl;
return 1;
}
int main(int argc, char* argv[])
{
try
{
if (argc != 2)
{
std::cerr << "Usage: client <host>" << std::endl;
return 1;
}
用asio进行网络连接至少需要一个boost::asio::io_service对象
boost::asio::io_service io_service;
我们需要把在命令行参数中指定的服务器转换为TCP上的节点.完成这项工作需要boost::asio::ip::tcp::resolver对象
tcp::resolver resolver(io_service);
一个resolver对象查询一个参数,并将其转换为TCP上节点的列表.这里我们把argv[1]中的sever的名字和要查询字串daytime关联.
tcp::resolver::query query(argv[1], "daytime");
节点列表可以用 boost::asio::ip::tcp::resolver::iterator 来进行迭代.iterator默认的构造函数生成一个end iterator.
tcp::resolver::iterator endpoint_iterator = resolver.resolve(query);
tcp::resolver::iterator end;
tcp::resolver::iterator end;
现在我们建立一个连接的sockert,由于获得节点既有IPv4也有IPv6的.所以,我们需要依次尝试他们直到找到一个可以正常工作的.这步使得我们的程序独立于IP版本
tcp::socket socket(io_service);
boost::asio::error error = boost::asio::error::host_not_found;
while (error && endpoint_iterator != end)
{
socket.close();
socket.connect(*endpoint_iterator++, boost::asio::assign_error(error));
}
if (error)
throw error;
boost::asio::error error = boost::asio::error::host_not_found;
while (error && endpoint_iterator != end)
{
socket.close();
socket.connect(*endpoint_iterator++, boost::asio::assign_error(error));
}
if (error)
throw error;
连接完成,我们需要做的是读取daytime服务器的响应.
我们用boost::array来保存得到的数据,boost::asio::buffer()会自动根据array的大小暂停工作,来防止缓冲溢出.除了使用boost::array,也可以使用char [] 或std::vector.
for (;;)
{
boost::array<char, 128> buf;
boost::asio::error error;
size_t len = socket.read_some(
boost::asio::buffer(buf), boost::asio::assign_error(error));
{
boost::array<char, 128> buf;
boost::asio::error error;
size_t len = socket.read_some(
boost::asio::buffer(buf), boost::asio::assign_error(error));
当服务器关闭连接时,boost::asio::ip::tcp::socket::read_some()会用boost::asio::error::eof标志完成, 这时我们应该退出读取循环了.
if (error == boost::asio::error::eof)
break; // Connection closed cleanly by peer.
else if (error)
throw error; // Some other error.
std::cout.write(buf.data(), len);
}
break; // Connection closed cleanly by peer.
else if (error)
throw error; // Some other error.
std::cout.write(buf.data(), len);
}
如果发生了什么异常我们同样会抛出它
}
catch (std::exception& e)
{
std::cerr << e.what() << std::endl;
}
catch (std::exception& e)
{
std::cerr << e.what() << std::endl;
}
运行示例:在windowsXP的cmd窗口下
输入:upload.exe time-a.nist.gov
输出:54031 06-10-23 01:50:45 07 0 0 454.2 UTC(NIST) *
完整的代码:
#include <iostream>
#include <boost/array.hpp>
#include <asio.hpp>
using asio::ip::tcp;
int main(int argc, char* argv[])
{
try
{
if (argc != 2)
{
std::cerr << "Usage: client <host>" << std::endl;
return 1;
}
asio::io_service io_service;
tcp::resolver resolver(io_service);
tcp::resolver::query query(argv[1], "daytime");
tcp::resolver::iterator endpoint_iterator = resolver.resolve(query);
tcp::resolver::iterator end;
tcp::socket socket(io_service);
asio::error error = asio::error::host_not_found;
while (error && endpoint_iterator != end)
{
socket.close();
socket.connect(*endpoint_iterator++, asio::assign_error(error));
}
if (error)
throw error;
for (;;)
{
boost::array<char, 128> buf;
asio::error error;
size_t len = socket.read_some(
asio::buffer(buf), asio::assign_error(error));
if (error == asio::error::eof)
break; // Connection closed cleanly by peer.
else if (error)
throw error; // Some other error.
std::cout.write(buf.data(), len);
}
}
catch (std::exception& e)
{
std::cerr << e.what() << std::endl;
}
return 0;
}
#include <boost/array.hpp>
#include <asio.hpp>
using asio::ip::tcp;
int main(int argc, char* argv[])
{
try
{
if (argc != 2)
{
std::cerr << "Usage: client <host>" << std::endl;
return 1;
}
asio::io_service io_service;
tcp::resolver resolver(io_service);
tcp::resolver::query query(argv[1], "daytime");
tcp::resolver::iterator endpoint_iterator = resolver.resolve(query);
tcp::resolver::iterator end;
tcp::socket socket(io_service);
asio::error error = asio::error::host_not_found;
while (error && endpoint_iterator != end)
{
socket.close();
socket.connect(*endpoint_iterator++, asio::assign_error(error));
}
if (error)
throw error;
for (;;)
{
boost::array<char, 128> buf;
asio::error error;
size_t len = socket.read_some(
asio::buffer(buf), asio::assign_error(error));
if (error == asio::error::eof)
break; // Connection closed cleanly by peer.
else if (error)
throw error; // Some other error.
std::cout.write(buf.data(), len);
}
}
catch (std::exception& e)
{
std::cerr << e.what() << std::endl;
}
return 0;
}
3.8. TCP同步时间服务器
#include <ctime>
#include <iostream>
#include <string>
#include <asio.hpp>
using asio::ip::tcp;
#include <iostream>
#include <string>
#include <asio.hpp>
using asio::ip::tcp;
我们先定义一个函数返回当前的时间的string形式.这个函数会在我们所有的时间服务器示例上被使用.
std::string make_daytime_string()
{
using namespace std; // For time_t, time and ctime;
time_t now = time(0);
return ctime(&now);
}
int main()
{
try
{
asio::io_service io_service;
{
using namespace std; // For time_t, time and ctime;
time_t now = time(0);
return ctime(&now);
}
int main()
{
try
{
asio::io_service io_service;
新建一个asio::ip::tcp::acceptor对象来监听新的连接.我们监听TCP端口13,IP版本为V4
tcp::acceptor acceptor(io_service, tcp::endpoint(tcp::v4(), 13));
这是一个iterative server,也就是说同一时间只能处理一个连接.建立一个socket来表示一个和客户端的连接, 然后等待客户端的连接.
for (;;)
{
tcp::socket socket(io_service);
acceptor.accept(socket);
{
tcp::socket socket(io_service);
acceptor.accept(socket);
当客户端访问服务器时,我们获取当前时间,然后返回它.
std::string message = make_daytime_string();
asio::write(socket, asio::buffer(message),
asio::transfer_all(), asio::ignore_error());
}
}
asio::write(socket, asio::buffer(message),
asio::transfer_all(), asio::ignore_error());
}
}
最后处理异常
catch (std::exception& e)
{
std::cerr << e.what() << std::endl;
}
return 0;
}
{
std::cerr << e.what() << std::endl;
}
return 0;
}
运行示例:运行服务器,然后运行上一节的客户端,在windowsXP的cmd窗口下
输入:client.exe 127.0.0.1
输出:Mon Oct 23 09:44:48 2006
完整的代码:
#include <ctime>
#include <iostream>
#include <string>
#include <asio.hpp>
using asio::ip::tcp;
std::string make_daytime_string()
{
using namespace std; // For time_t, time and ctime;
time_t now = time(0);
return ctime(&now);
}
int main()
{
try
{
asio::io_service io_service;
tcp::acceptor acceptor(io_service, tcp::endpoint(tcp::v4(), 13));
for (;;)
{
tcp::socket socket(io_service);
acceptor.accept(socket);
std::string message = make_daytime_string();
asio::write(socket, asio::buffer(message),
asio::transfer_all(), asio::ignore_error());
}
}
catch (std::exception& e)
{
std::cerr << e.what() << std::endl;
}
return 0;
}
#include <iostream>
#include <string>
#include <asio.hpp>
using asio::ip::tcp;
std::string make_daytime_string()
{
using namespace std; // For time_t, time and ctime;
time_t now = time(0);
return ctime(&now);
}
int main()
{
try
{
asio::io_service io_service;
tcp::acceptor acceptor(io_service, tcp::endpoint(tcp::v4(), 13));
for (;;)
{
tcp::socket socket(io_service);
acceptor.accept(socket);
std::string message = make_daytime_string();
asio::write(socket, asio::buffer(message),
asio::transfer_all(), asio::ignore_error());
}
}
catch (std::exception& e)
{
std::cerr << e.what() << std::endl;
}
return 0;
}
4. Filesystem Library 文件系统
推荐使用支持W3C标准的浏览器进行阅读,获得最佳页面效果,谢绝IE的混乱解析!
Searching all CPUG sites and mailist::
- Web
- getACL = 0.002s
- load_multi_cfg = 0.000s
- run = 0.402s
- send_page = 0.401s
- send_page_content = 0.349s
- total = 0.407s
Steve Saunders, a spokesman for nearby Adams County schools, said the district is trying to strike a balance between reassuring students and their
回复删除parents that they are safe, while encouraging them to be vigilant.
Survey: 50% of Americans are cell phone video spies http://tinyurl.com/bx5hgfb Delgaudio, first elected to the Loudoun County Board of Supervisors in 1999, sat on the board of directors for Young Americans for Freedom for 10 years. Much was already known about the series of oversights and missteps the government made leading to the terror attack at the Fort Hood Army post, but the report revealed new details.
Also visit my webpage ; reverse number lookup
Mulching Lawn Mower - How to Mulch Your Grass for a
回复删除Healthier and Greener Lawn Don't Try To Grow Plants Till You Have Mulched
Here is my website :: ewhaewha.com
Visit my website ... tree nursery ozaukee county
How do i forward my blogspot account to my website website name?
回复删除Also visit my blog post :: transvaginal mesh lawsuit
Would it not be wise to minor in creative writing and major in biochemistry?
回复删除My page magic submitter review
Hello, I check your blog on a regular basis. Your writing style is
回复删除witty, keep up the good work!
my website - http://www.forum.childf.ir/member.php?action=profile&uid=8304
Excellent goods from you, man. I have understand your stuff previous to and
回复删除you are just too magnificent. I actually like what you have acquired here, really like
what you're saying and the way in which you say it. You make it entertaining and you still care for to keep it wise. I cant wait to read much more from you. This is really a tremendous website.
My homepage; Make Travel Far More Comfortable And Enjoyable | Forum | Women and US Foreign Policy.
Hello, this weekend is good in support of me, for
回复删除the reason that this time i am reading this enormous informative post
here at my residence.
Also visit my page :: best reseller web hosting
Ahaa, its nice conversation regarding this article
回复删除here at this blog, I have read all that, so now me also commenting here.
Review my homepage ... gesetzliche krankenkassen vergleichen
Also see my web page > wechsel private kv in gesetzliche kv
Hello to every single one, it's really a fastidious for me to visit this site, it consists of priceless Information.
回复删除Here is my web site: companies that Consolidate private student loans
These are really wonderful ideas in about blogging.
回复删除You have touched some good points here. Any way keep up wrinting.
Also visit my blog post: Steinzeit Diät Rezepte
Also see my site > gel zum abnehmen
Greetings I am so glad I found your weblog, I really found you by mistake, while I was searching on
回复删除Aol for something else, Anyways I am here now and would just like to say cheers
for a remarkable post and a all round exciting blog (I also love the theme/design), I
don’t have time to browse it all at the minute but I have book-marked
it and also included your RSS feeds, so when I have time I
will be back to read more, Please do keep up the fantastic jo.
my website :: web provider
Also see my web site: free reseller
Just wish to say your article is as amazing. The clarity in your
回复删除post is simply excellent and i could assume you're an expert on this subject. Well with your permission let me to grab your feed to keep updated with forthcoming post. Thanks a million and please carry on the enjoyable work.
Take a look at my web-site ... basistarif pkv 2011
This paragraph is in fact a fastidious one it assists new net users,
回复删除who are wishing in favor of blogging.
Look at my web site ... Full Post
Someone necessarily assist to make significantly articles I would state.
回复删除That is the first time I frequented your web page and so far?
I amazed with the analysis you made to make this particular
submit amazing. Wonderful job!
Stop by my website: become an affiliate
Today, I went to the beach front with my children.
回复删除I found a sea shell and gave it to my 4 year old daughter and said
"You can hear the ocean if you put this to your ear." She put the shell to her ear and screamed.
There was a hermit crab inside and it pinched her ear.
She never wants to go back! LoL I know this is completely off topic but I had to tell someone!
Feel free to surf to my page online shop clothes
My page :: winterjacken outlet online
I am sure this post has touched all the internet people,
回复删除its really really nice post on building up new blog.
Look into my web site: salomon outlet online
Hurrah! After all I got a website from where I be capable of
回复删除genuinely get valuable information concerning my
study and knowledge.
My site; http://openaccess.moodle.com.au/user/view.php?id=11824&course=1
My web site > bad credit home loan mortgage refinancing
Whats up are using Wordpress for your blog platform?
回复删除I'm new to the blog world but I'm trying to get started and create my own.
Do you need any html coding expertise to make your own blog?
Any help would be really appreciated!
Here is my page - private krankenversicherung liste
Also see my website > simply click the following web site
Heya i am for the first time here. I came across this board and I find It truly useful &
回复删除it helped me out much. I hope to give something back and aid others like you aided me.
My site ... 30 year home Equity loan
Hmm it appears like your website ate my first comment (it was super long) so I guess I'll just sum it up what I had written and say, I'm thoroughly enjoying your blog.
回复删除I as well am an aspiring blog writer but I'm still new to everything. Do you have any points for novice blog writers? I'd certainly appreciate it.
Also visit my weblog: http://liberallibertario.org/wiki/index.php?title=Usuario:TheoR6
I know this web site offers quality dependent content and extra information, is there any other web page which offers these things in quality?
回复删除Feel free to visit my weblog - steuerpflicht
my webpage :: selbständige bilanzbuchhalter
It's awesome designed for me to have a website, which is beneficial in support of my knowledge. thanks admin
回复删除Here is my blog: glutenfreie rezepte
Keep this going please, great job!
回复删除Feel free to surf to my web page - see more
My family always say that I am killing my time here at net, however
回复删除I know I am getting familiarity everyday by reading such nice content.
my webpage: kohlenhydrate diat
Oh my goodness! Amazing article dude! Many thanks, However
回复删除I am going through difficulties with your RSS. I don't understand the reason why I cannot subscribe to it. Is there anyone else having identical RSS issues? Anybody who knows the solution will you kindly respond? Thanks!!
Feel free to visit my website: Online Ratenkredit
my page: http://wiki.opentom.org/wiki/index.php?title=User:KZICory
Usually, the best time to expect free time on Xbox Live is when there is a gaming event
回复删除taking place (such as the launching of a new game).
The best time to visit the Microsoft website is when there happens to be an event
that touches on gaming such as the launch of an entirely new game.
There is nothing open and even if there were you spent way too much money
on gifts.
Feel free to visit my web site :: free xbox live codes
my site: microsoft points codes
Hello there! This blog post could not be written much better!
回复删除Reading through this post reminds me of my previous roommate!
He always kept talking about this. I most certainly will forward this
article to him. Fairly certain he will have a
great read. I appreciate you for sharing!
Here is my site :: rootcanal.pba-dental.com
My page - root canal crown cost
Do you have a spam issue on this site; I also am a blogger, and I was wondering your situation; we have created some
回复删除nice methods and we are looking to swap methods
with other folks, be sure to shoot me an e-mail if interested.
Review my site :: low carb low fat diet
my web site: paläo ernährung
This text is invaluable. How can I find out more?
回复删除Here is my page; minijobs
Excellent beat ! I wish to apprentice even as you amend
回复删除your site, how could i subscribe for a weblog site?
The account helped me a acceptable deal. I have been tiny bit familiar of this your broadcast provided brilliant
clear concept
Look into my web-site ... wordpress designer
You actually make it seem really easy with
回复删除your presentation but I in finding this matter to be actually something
which I feel I would by no means understand. It seems too complicated and very huge for me.
I am having a look forward for your subsequent post, I will try to get the
dangle of it!
my web page paleo-rezepte
This site really has all the information I needed about this subject and didn't know who to ask.
回复删除Here is my weblog: internet marketing ebook
Sweet blog! I found it while browsing on Yahoo News.
回复删除Do you have any suggestions on how to get listed in Yahoo News?
I've been trying for a while but I never seem to get there! Many thanks
My web site - low carb peanut butter
Also see my site > steinzeitdiät
I'm really enjoying the theme/design of your website. Do you ever run into any browser compatibility issues? A handful of my blog readers have complained about my website not operating correctly in Explorer but looks great in Chrome. Do you have any tips to help fix this issue?
回复删除Here is my blog post ... wordpress calendar plugin
It's actually a cool and useful piece of information. I'm glad that you
回复删除simply shared this helpful information with us. Please stay
us informed like this. Thanks for sharing.
My web-site: wechsel private krankenversicherung 2011
It's actually a cool and useful piece of information. I'm glad that you simply shared this helpful information with us.
回复删除Please stay us informed like this. Thanks for sharing.
Also visit my web-site; wechsel private krankenversicherung 2011
Also see my webpage - pkv tarifwechsel
hey there and thank you for your info – I have
回复删除certainly picked up anything new from right here.
I did however expertise several technical points using this site, as I experienced
to reload the site lots of times previous to I could get it to load correctly.
I had been wondering if your web host is OK? Not that I'm complaining, but slow loading instances times will very frequently affect your placement in google and could damage your high-quality score if advertising and marketing with Adwords. Well I am adding this RSS to my email and could look out for a lot more of your respective intriguing content. Make sure you update this again very soon.
My web-site Steinzeit Diät Erfahrungen
Also see my page :: Steinzeit-Diät Erfahrungen
Do you mind if I quote a couple of your posts as long as I provide
回复删除credit and sources back to your blog? My blog is in the very same niche as
yours and my users would definitely benefit from some of
the information you present here. Please let me know if this okay with you.
Regards!
Take a look at my site ... Finanzberater in Wiesbaden
This paragraph provides clear idea in support of the new users of blogging,
回复删除that really how to do running a blog.
my site :: gallery
Simply desire to say your article is as astounding. The clarity on your submit
回复删除is just nice and i can assume you're a professional on this subject. Fine together with your permission let me to snatch your feed to stay up to date with approaching post. Thanks one million and please keep up the enjoyable work.
Also visit my web page - visit
Excellent way of explaining, and fastidious article to take facts
回复删除regarding my presentation focus, which i am going to present in academy.
my web blog: zöliakie
My page > glutenfreie Ernährung
Wow! In the end I got a webpage from where I can really obtain useful data concerning my study and knowledge.
回复删除Take a look at my web page paleoernährung
You are so interesting! I don't suppose I've truly read through anything like
回复删除that before. So good to find somebody with a few genuine thoughts on this subject.
Really.. many thanks for starting this up. This site is one thing that
is needed on the internet, someone with some originality!
Also visit my web site - Hot Stone
Also see my website > Traditionelle
I was suggested this blog by my cousin. I'm not sure whether this post is written by him as no one else know such detailed about my trouble. You are incredible! Thanks!
回复删除My web page :: wordpress admin url
My page: wordpress schulungen
Howdy just wanted to give you a quick heads up and let you know a few
回复删除of the images aren't loading correctly. I'm not sure why but I think its a linking issue.
I've tried it in two different web browsers and both show the same results.
Here is my web blog; steuerfachwirt ausbildung
I always used to study article in news papers but now as I am a user
回复删除of web thus from now I am using net for articles, thanks to web.
My blog post: wordpress video schulung
Heya i am for the first time here. I found this board and I find It truly useful & it helped me out much.
回复删除I hope to give something back and aid others like you aided me.
my webpage - wordpress themes 2011
May I simply just say what a relief to uncover a person
回复删除that genuinely understands what they are discussing on the web.
You certainly know how to bring an issue to light and make
it important. A lot more people must read this
and understand this side of the story. I was surprised you aren't more popular because you definitely possess the gift.
Also visit my blog ... lenkmatte empfehlung
I'm truly enjoying the design and layout of your site. It's
回复删除a very easy on the eyes which makes it much more pleasant
for me to come here and visit more often. Did you hire out a developer to create your theme?
Fantastic work!
Also visit my site :: all inclusive wedding packages
Howdy! I could have sworn I've been to this web site before but after looking at a few of the posts I realized it's new to me.
回复删除Regardless, I'm definitely happy I stumbled upon it and I'll be book-marking it and
checking back often!
my web site: wireless warrior - user detail :: wireless-warrior.org
Good way of describing, and nice post to get information regarding
回复删除my presentation subject, which i am going to deliver in school.
Here is my site: late deals to spain
Although it is often mistaken for obesity, cellulite is not actually obesity related because
回复删除it can also take place in thin lean women.
There are cellulite creams made with natural ingredients that stimulate the skin and reduce water retention beneath the skin.
You do not have to perform these exercises every day, all you need is to do them three times (3x) a week for about thirty minutes each session.
Here is my blog - http://www.Belle.hk/
I've been surfing on-line greater than 3 hours as of late, but I by no means found any attention-grabbing article like yours. It is beautiful price sufficient for me. In my view, if all site owners and bloggers made excellent content as you did, the web will be a lot more useful than ever before.
回复删除Here is my webpage More inspiring ideas
Your style is unique compared to other folks I've read stuff from. Many thanks for posting when you've
回复删除got the opportunity, Guess I'll just book mark this page.
My webpage More Information
hi!,I lοve your wгiting so sο much!
回复删除share we keep up a corresponԁence more аbout уour ρost οn AOL?
І гequire a spеciаlist in this space tο unrаvel my рroblem.
Maybe that's you! Taking a look ahead to look you.
Feel free to visit my blog; effective link building strategies
continuously i used to read smaller articles or reviews that
回复删除also clear their motive, and that is also happening with this paragraph
which I am reading at this place.
My web page :: kredite mit schufa
Either I stop biting my nails, or she gives me a full refund.
回复删除Soft nails means that your nails have too much moisture.
According to Web - Md males tend to bite their nails more
than women.
Also visit my web blog: How to stop biting nails
Hi, i think that i saw you visited my web site thus i
回复删除came to “return the favor”.I am attempting
to find things to enhance my website!I suppose its ok to use a few of your ideas!
!
My homepage; carhartt streewear
I got this web site from my pal who shared with me about this site and now this time I am visiting this site and reading very
回复删除informative articles or reviews at this place.
Feel free to visit my webpage; individual Dental plans
For the reason that the admin of this web site is working, no doubt very soon
回复删除it will be famous, due to its quality contents.
Here is my weblog - http://www.debatiendo.cl/html/index.php?blog/show/100
This is very interesting, You are a very skilled blogger.
回复删除I have joined your rss feed and look forward to seeking more of your
fantastic post. Also, I have shared your web
site in my social networks!
Feel free to visit my weblog; http://answers.yahoo.com/question/index;_ylt=Al_RDGCt.buUYGZzHb99rHnty6IX;_ylv=3?qid=20130218145026AAXnGEg
Thanks , I have just been searching for info about this topic for ages and yours is the greatest I've came upon so far. But, what concerning the bottom line? Are you positive in regards to the source?
回复删除Check out my homepage ... okofitnesz.hu
When someone writes an paragraph he/she keeps the plan of a user in his/her brain that how a user can understand it.
回复删除So that's why this article is great. Thanks!
Have a look at my page - hushmail
Hi there, I found your blog via Google even
回复删除as looking for a related matter, your website got here up, it looks
great. I've bookmarked it in my google bookmarks.
Hi there, just turned into alert to your blog through Google, and found that it is truly informative. I am gonna be careful for brussels. I will be grateful for those who proceed this in future. A lot of folks shall be benefited out of your writing. Cheers!
My blog find a loan
Asking questions are actually good thing if you are not understanding anything entirely, but this post gives
回复删除nice understanding even.
My web blog :: http://didattica.fuss.bz.it
I for all time emailed this web site post page to all my friends, for the reason that if like
回复删除to read it then my links will too.
Check out my website - entrepreneur business opportunities
I do conѕider аll of the ideas you've offered for your post. They are really convincing and can certainly work. Still, the posts are very quick for novices. May just you please lengthen them a bit from subsequent time? Thank you for the post.
回复删除Here is my blog post :: payday loans
Informative article, exactly what I needed.
回复删除Have a look at my page :: Zusatzbeitrag Der Krankenkassen
For most up-to-date information you have to pay a quick vіsit thе web and on woгld-wiԁe-ωeb I
回复删除found this webѕіte as a most ехсellent site fοr newеst
updates.
Stοp bу my site :: cialis prix
It's an amazing piece of writing for all the web users; they will take benefit from it I am sure.
回复删除Visit my web blog: bokk of ra
I have an essay in Microsoft Word format which I want to copy/paste into my blogspot blog.
回复删除But whenever I actually do this, I get error messages from blogspot about all the weird Word coding, and then it is about out looking all
crazy format-wise. How do i strip the written text of all the Word junk?
.. I don't know anything about HTML..
Have a look at my site: magic submitter bonus
DJ spins out on Saturday nights. Below are listed a few popular pubs where one can chill in Mumbai.
回复删除Her father, Bruce Paltrow, produced the critically acclaimed TV series that is considered the precursor
to many medical shows today, St.
Also visit my blog post ... pub quiz austin
Hello there, I discovered your blog by the use of Google while looking for a comparable topic, your web
回复删除site got here up, it appears to be like good. I've bookmarked it in my google bookmarks.
Hello there, simply changed into alert to your weblog thru Google, and located that it's really informative.
I'm gonna be careful for brussels. I'll appreciate when you
proceed this in future. A lot of people will likely be benefited out of your writing.
Cheers!
My blog :: answers.yahoo.com
I always spent my half an hour to read this weblog's posts everyday along with a cup of coffee.
回复删除Visit my page sulusaray.bel.tr
Hi there, I chеck уour blogs on a regulаr basis.
回复删除Yοur humoгistiс ѕtylе is аwеsome, keep ԁoing ωhаt yοu're doing!
my web-site: link building service
Upon returning to the starting line, the first
回复删除player must pass the sugar cube to the next teammate in line and so on.
The game was released on August 3, and is in stores now, but probably is where it will remain,
sad to say. Play games all night long in keeping with the twenties theme such as various
card games and crossword puzzles.
Feel free to visit my page bancaja
If all players are wrong the murderer gets away and everyone loses.
回复删除This was zero cost because the students went to local stores and asked for either
donations and gift cards to purchase these items. Every Halloween party that people remember
later in the year by saying things like "Do you remember so-and-so's Halloween party last year.
My web blog: beach
Ηey thегe tеrrіfiс blog!
回复删除Does гunning a blog similar to this take a lot of
ωork? І have νіrtuаlly no undегstanԁing оf
сodіng hοwever I had been hoping to ѕtагt my own blog ѕoοn.
Αnyway, if you hаve any suggeѕtionѕ
ог tips fоr new blog oωners plеаѕe ѕhаre.
Ι know thіs iѕ off tоpiс but Ι sіmply
wanted to asκ. Kudos!
Feel free tο ѕuгf to my webpagе link building service
Genеrаllу I dο not lеarn poѕt on blogs, however I
回复删除would liκe to say that thiѕ write-up veгу forced me
tо take a loοκ at аnd do it!
Үouг writing taѕtе has been surprіsed mе.
Thank yоu, quite grеat ρоst.
Alѕo visit my blοg pоst :: similar resource site
My computer crashes in the beginning of a streaming video or of the full windowed gaming?
回复删除my website :: http://is.gd/nwSDkP
Some were practical, of course, but others were psychological and emotional.
回复删除I believe my exact words were "I don't want to be your dirty little secret. 8.
my website; pub quiz archive
Hi there friends, how is everything, and what you would like to
回复删除say regarding this piece of writing, in my view its truly remarkable
in favor of me.
my website erotic games
Some were practical, of course, but others were psychological and emotional.
回复删除Popular prizes include sports tickets, cash and vouchers for drinks, food - and dollars off
of tabs. The food is decent and the drink specials on Tuesdays include $2.
my web-site - fun pub quiz names
DJ spins out on Saturday nights. I believe my exact words were "I don't want to be your dirty little secret. Theme Format: It is almost like standard format of the pub quiz.
回复删除Feel free to visit my web blog ... pub quiz and answers
Also the collar is important and should be taken into consideration when you are shopping for sun protection shirts.
回复删除About the time I woke him up it dawned on me that he was having an allergic
reaction to the medication. To keep them from getting into anything that you
might find gross, it is a good idea to bring along either sandals or water shoes for them.
With proper management you can give your users
回复删除but loyal customers serve spreading your point even further.
So to enjoy increased Internet Page views you must specified your
website is extremely ranked by search engines.
Feel free to visit my page :: seo service melbourne
The only hurdle to accessing this is of course human limitations and the fact that the brain does not function
回复删除solely as a learning tool for the human being. Anna had been looking through my phone while I was
naked. The buccal cavity is a small cavity that has neither jaws nor teeth.
my blog pub quiz austin texas
If you would like to improve your know-how simply keep
回复删除visiting this website and be updated with the hottest gossip posted here.
My website :: excellent golden Retriever yellow lab mix tips
Quality content is the secret to attract the people to visit the web page, that's what this site is providing.
回复删除my site http://Pornharvest.com/index.php?m=2468088
If some one needs to be updated with newest technologies after that he must be pay a quick visit this
回复删除site and be up to date everyday.
Stop by my site: golden retriever lab mix puppy
You could certainly see your expertise within the
回复删除article you write. The world hopes for even more passionate
writers like you who are not afraid to say how they
believe. All the time follow your heart.
My site: cute teen hotty experiments with anal plugging
Hi there! This post couldn't be written any better! Reading through this post reminds me of my previous room mate! He always kept chatting about this. I will forward this post to him. Fairly certain he will have a good read. Thank you for sharing!
回复删除My page; yellow lab golden retriever
Thank you, I've just been looking for info about this topic for a long time and yours is the best I've came upon so
回复删除far. However, what in regards to the conclusion? Are you positive about the source?
My blog get minature golden retriever material
I always emailed this web site post page to all my associates, for the reason that if like to read
回复删除it next my links will too.
my blog useful golden retriever health issues facts
I am sure this paragraph has touched all the internet visitors,
回复删除its really really good piece of writing on building up new blog.
Also visit my homepage - click for training your golden retriever info
I'm curious to find out what blog platform you are working with? I'm having some minor
回复删除security problems with my latest website and I'd like to find something more safe. Do you have any recommendations?
Feel free to surf to my web page - Helpful Resources
I was wondering if you ever considered changing the structure of your site?
回复删除Its very well written; I love what youve got to say. But
maybe you could a little more in the way of content so people could connect with it better.
Youve got an awful lot of text for only having one or 2 images.
Maybe you could space it out better?
My web page; click for golden retrievers health issues tips
Narrow blood vessels lie alongside the intestines of the earthworm
回复删除and they absorb the nutrients from the alimentary canal feeding the rest of the body.
Anna had been looking through my phone while I
was naked. Ask your local club to run this for you.
my web site :: pub quiz archive
I enjoy, result in I found just what I was having a look for.
回复删除You've ended my 4 day long hunt! God Bless you man. Have a great day. Bye
Feel free to surf to my web blog ... twitter password reset
In that case, this kind of question should not be taken from any show telecasted in specific country.
回复删除You must definitely be planning to make it special and memorable by keeping a good theme,
ordering the best food and choosing the best games.
They feature almost nightly drink specials and some form of entertainment every night of the
week--DJ's, live music, trivia, you name it.
Have a look at my website: great pub quiz names
I am gеnuinelу pleasеd tο rеad this ωеblοg posts ωhiсh includes lots of valuable data, thanκs for pгοviԁіng these kinds of statiѕtics.
回复删除Stop bу my website - Arjun Kanuri
I nеeded to thank yоu fοr this fаntаѕtic геaԁ!
回复删除! I definitelу loved every little bit of it.
І havе you booκmarkeԁ to loοκ аt nеω
stuff уou poѕt…
My ωеbsite: Arjun Kanuri
Hi there to every body, it's my first go to see of this website; this webpage contains amazing and in fact good material in favor of readers.
回复删除My web page :: minecraft giftcode
I am really impressed with your writing skills and also with the layout on your blog.
回复删除Is this a paid theme or did you customize it yourself?
Anyway keep up the nice quality writing, it's rare to see a nice blog like this one these days.
My web blog: tuinman brasschaa
Greetings from Idaho! I'm bored to death at work so I decided to browse your website on my iphone during lunch break. I love the info you present here and can't wait to
回复删除take a look when I get home. I'm surprised at how quick your blog loaded on my mobile .. I'm not even using WIFI, just 3G .
. Anyhow, superb site!
Look into my web-site cheap link building services
Hey would you mind stating which blog platform you're using? I'm planning to start my own blog in the near future but I'm having a difficult time making a decision between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design seems different then most blogs and I'm looking for something completely unique.
回复删除P.S Apologies for being off-topic but I had to ask!
Here is my webpage ... This Web-site
With havin so much written content do you ever run into any issues of plagorism or copyright infringement?
回复删除My website has a lot of completely unique content I've either written myself or outsourced but it appears a lot of it is popping it up all over the internet without my permission. Do you know any ways to help protect against content from being stolen? I'd definitely appreciate
it.
Feel free to surf to my site :: Psn Code Generator
I’m not that much of a internet reader to be honest but your sites really nice, keep it up!
回复删除I'll go ahead and bookmark your website to come back down the road. Cheers
Stop by my blog post :: $20 PSN Card
You've made some decent points there. I checked on the web for additional information about the issue and found most individuals will go along with your views on this website.
回复删除my weblog :: how to easy make money
Link exchange is nothing else but it is just placing the other person's webpage link on your page at proper place and other person will also do similar for you.
回复删除Feel free to surf to my website - was nubiles hayden hawkens
Hi, its fastidious piece of writing regarding media print,
回复删除we all be familiar with media is a wonderful source of data.
my homepage; pornharvest.com
It's awesome to visit this web page and reading the views of all mates on the topic of this paragraph, while I am also zealous of getting knowledge.
回复删除Stop by my web site ... cheat for castle ville
I'd like to thank you for the efforts you've put in penning this blog.
回复删除I am hoping to check out the same high-grade content
from you later on as well. In truth, your creative writing abilities has motivated me to get my own,
personal website now ;)
Also visit my blog post: two playful lesbians
bookmarked!!, I love your web site!
回复删除My webpage ... pirater un compte Facebook
Very good post! We are linking to this particularly great
回复删除content on our website. Keep up the great writing.
Here is my page; http://pornharvest.com/index.php?m=2084074
Does your site have a contact page? I'm having trouble locating it but, I'd like to shoot you an e-mail.
回复删除I've got some creative ideas for your blog you might be interested in hearing. Either way, great website and I look forward to seeing it develop over time.
Also visit my webpage - oph crack
Informative article, just what I wanted to
回复删除find.
Feel free to visit my website ... Funny Videos
It's very straightforward to find out any topic on web as compared to textbooks, as I found this article at this site.
回复删除Feel free to surf to my blog post minecraft accounts
In other words, they go against the grain of the careers their parents had.
回复删除At the end of each round read out the cumulative scores.
The buccal cavity is a small cavity that has neither jaws nor teeth.
my web page: pub quiz aberdeen
Some were practical, of course, but others were psychological and emotional.
回复删除You must definitely be planning to make it special and memorable by keeping a good theme,
ordering the best food and choosing the best games.
The food is decent and the drink specials on Tuesdays include $2.
Also visit my web blog: clever pub quiz names
In that case, this kind of question should not be
回复删除taken from any show telecasted in specific country.
Anna had been looking through my phone while I was naked.
8.
Stop by my web blog; redtooth pub quiz answers
DJ spins out on Saturday nights. Brazenhead is a great place to go with
回复删除your family or for a business lunch or dinner, but if you are looking for a party atmosphere, this isn't it. The buccal cavity is a small cavity that has neither jaws nor teeth.
my blog post :: free pub quiz and answers
Attractive section of content. I just stumbled upon
回复删除your weblog and in accession capital to assert that I get in
fact enjoyed account your blog posts. Anyway I'll be subscribing to your augment and even I achievement you access consistently fast.
My blog post ... review of quantrim
On Sunday nights Erin Jaimes hosts a blues jam where anyone from Alan
回复删除Haynes to Gary Clark, Jr. Below are listed a few popular pubs where one can chill in Mumbai.
They feature almost nightly drink specials and some form
of entertainment every night of the week--DJ's, live music, trivia, you name it.
My blog: best pub quiz team names
Wonderful beat ! I would like to apprentice at the same time as you amend your website, how could i subscribe for a weblog site?
回复删除The account helped me a appropriate deal. I were tiny bit
acquainted of this your broadcast offered bright transparent idea
Also visit my weblog: Microsoft Office Gratuit
I was suggested this web site by way of my cousin. I'm now not positive whether this publish is written through him as no one else recognize such precise about my difficulty. You are amazing! Thanks!
回复删除Look at my website: Generateur de Code PSN
(Thank you rounds are always welcome, of course. *
回复删除Team answer sheets - Basically a grid lined A4 type sheet with answer write in numbered boxes and
a line on top for the team name. The Bull's Head Pub, Bangkok.
My site; best pub quiz names
Spot on with this write-up, I seriously believe this amazing site needs
回复删除a great deal more attention. I'll probably be returning to see more, thanks for the info!
my page - Candy Crush Saga Cheats
Oh my goodness! Incredible article dude! Thank you, However I am
回复删除experiencing issues with your RSS. I don't understand why I can't join
it. Is there anyone else having identical RSS problems?
Anyone who knows the answer can you kindly respond?
Thanx!!
Here is my webpage :: e-væske
Just desire to say your article is as astounding. The clearness in your submit is just spectacular
回复删除and that i could think you're a professional on this subject. Well with your permission allow me to snatch your feed to keep updated with coming near near post. Thank you 1,000,000 and please carry on the rewarding work.
Feel free to surf to my webpage; best ptc
Unquestionably believe that which you stated.
回复删除Your favorite justification seemed to be on the internet the simplest thing to be
aware of. I say to you, I definitely get irked while people think about worries that they plainly don't know about. You managed to hit the nail upon the top and defined out the whole thing without having side-effects , people can take a signal. Will probably be back to get more. Thanks
Check out my web page - make money on line
Ηeу There. I founԁ youг blog the usage of msn.
回复删除Thіs iѕ a very smartly written artіcle.
I'll be sure to bookmark it and come back to read more of your helpful info. Thank you for the post. I'll definіtely гeturn.
Taκe a lοok аt my page; hotel reputation management
Hmm it appears like your website ate my first comment (it was super long) so I guess I'll just sum it up what I had written and say, I'm thoroughly
回复删除enjoying your blog. I as well am an aspiring blog writer but
I'm still new to the whole thing. Do you have any points for first-time blog writers? I'd certainly
appreciate it.
Also visit my web page - related web-site
I am really impressed together with your writing talents as well
回复删除as with the structure on your blog. Is this a paid subject
or did you modify it yourself? Either way stay up the nice
high quality writing, it's uncommon to look a great blog like this one these days..
My web-site Dragon City Cheat Engine
My brother recommended I might like this blog. He was
回复删除once entirely right. This submit truly made my day. You can not imagine simply how a lot
time I had spent for this info! Thanks!
my blog: novoline automaten spielen
Hi! It appears as though we both have a interest for the same
回复删除thing. Your blog, "Blogger: 冠桥科技" and mine are
very similar. Have you ever considered writing a guest article for a related website?
It will definitely help gain exposure to your website (my website recieves a lot of visitors).
If you might be interested, email me at:
richelle_poland@yahoo.de. Appreciate it
Here is my web-site; visit the next web site
Hello there. I noticed your website title, "Blogger: 冠桥科技" doesn't really reflect the content of your site. When creating your site title, do you believe it's best
回复删除to write it for SEO or for your audience? This is one thing I've been struggling with due to the fact I want good rankings but at the same time I want the best quality for my visitors.
Feel free to surf to my web blog :: ..[read more []
Really no matter if someone doesn't be aware of after that its up to other visitors that they will assist, so here it takes place.
回复删除Also visit my site :: Psn Code Generator ()
My spouse and I stumbled over here by a different web address and thought I may as well
回复删除check things out. I like what I see so now i'm following you. Look forward to going over your web page yet again.
Here is my homepage: Click The Link ()
Hi there! Quick question that's completely off topic. Do you know how to make your site mobile friendly? My site looks weird when browsing from my apple iphone. I'm trying to find a template or plugin that might be able to fix this problem.
回复删除If you have any recommendations, please share. Thanks!
my web-site - get car insurance online
Hey! I know this is kind of off topic but I was wondering if you knew where I could locate
回复删除a captcha plugin for my comment form? I'm using the same blog platform as yours and I'm having problems finding one?
Thanks a lot!
Also visit my web-site; Click On this website ()
Hello, I am new to running a blog and websites in general and was
回复删除wanting to know how you got the "www" included in your web address name?
I see your web address, "http://www.blogger.com/comment.g?blogID=3761458228792711839&postID=1897197491613810836" has the
www and my web address looks like, "http://mydomain.com".
Do you know how I can alter this? I'm using Wordpress. Many thanks
My weblog; local seo services
Excellent beat ! I would like to apprentice while you amend
回复删除your site, how can i subscribe for a blog web site?
The account helped me a acceptable deal. I had been a
little bit acquainted of this your broadcast offered bright
clear idea
My website: xerox 8560mfp
If you want a Premium Minecraft Account check out this generator.
回复删除With it you can generate a unique Minecraft Premium
Account which no one else has! You can Download the Free Premium Minecraft Account Generator http://www.
minecraftdownload2013.tk
Post writing is also a fun, if you know afterward you
can write or else it is difficult to write.
Feel free to surf to my site - download minecraft
Εxcellent article! We will be lіnking
回复删除to this paгticularly great post on our
wеbsіte. Keep up the gοod writing.
my ρаge ... working from home ideas