摘要: //// prioritised_handlers.cpp// ~~~~~~~~~~~~~~~~~~~~~~~~//// Copyright (c) 2003-2013 Christopher M. Kohlhoff (chris at kohlhoff dot com)//// Distribut... 阅读全文
posted @ 2014-11-10 16:54 the wind's words 阅读(521) 评论(0) 推荐(0) 编辑
摘要: 第一个版本为单线程,短连接版本。效率蛮低的。代码分析在:http://files.cnblogs.com/cowerss/http_server.zip 阅读全文
posted @ 2014-11-07 11:58 the wind's words 阅读(306) 评论(0) 推荐(0) 编辑
摘要: //// async_client.cpp// ~~~~~~~~~~~~~~~~//异步的HTTP客户端,与同步的非常类似。较不同的是最后一点同步循环的地方// Copyright (c) 2003-2013 Christopher M. Kohlhoff (chris at kohlhoff do... 阅读全文
posted @ 2014-10-30 23:42 the wind's words 阅读(1440) 评论(0) 推荐(0) 编辑
摘要: //// sync_client.cpp// ~~~~~~~~~~~~~~~//HTTP客户端,同步// Copyright (c) 2003-2013 Christopher M. Kohlhoff (chris at kohlhoff dot com)//// Distributed under... 阅读全文
posted @ 2014-10-30 01:57 the wind's words 阅读(1129) 评论(0) 推荐(0) 编辑
摘要: //// process_per_connection.cpp// ~~~~~~~~~~~~~~~~~~~~~~~~~~//// Copyright (c) 2003-2013 Christopher M. Kohlhoff (chris at kohlhoff dot com)//// Distr... 阅读全文
posted @ 2014-10-17 23:48 the wind's words 阅读(634) 评论(0) 推荐(0) 编辑
摘要: // daemon.cpp// 该例子演示结合ASIO和POSIX标准系统的fork系统调用,产生一个守护进程。//时间服务器?// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)//// Dis... 阅读全文
posted @ 2014-10-15 23:11 the wind's words 阅读(1164) 评论(0) 推荐(0) 编辑
摘要: 本例子采用自定义的协议,完成了一个聊天室的功能。客户上线后能够发言,也能看见最近的消息记录,并能看到其他客户的消息。1.首先自定义消息格式。chat_message.hpp//// chat_message.hpp// ~~~~~~~~~~~~~~~~//// Copyright (c) 2003-2013 Christopher M. Kohlhoff (chris at kohlhoff dot com)//// Distributed under the Boost Software License, Version 1.0. (See accompanying// file LICEN 阅读全文
posted @ 2014-04-01 13:55 the wind's words 阅读(704) 评论(0) 推荐(0) 编辑
摘要: //// server.cpp// ~~~~~~~~~~//// Copyright (c) 2003-2013 Christopher M. Kohlhoff (chris at kohlhoff dot com)//// Distributed under the Boost Software License, Version 1.0. (See accompanying// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)///**该文件编写了一个简单的echo服务器。采用异步I/O的形式。特点在于 阅读全文
posted @ 2014-03-27 19:18 the wind's words 阅读(741) 评论(0) 推荐(0) 编辑
摘要: 有时候更多的linux用户会选择使用命令行操作系统,因为linux的图像界面不是很稳定,而且还好资源。 故不少用户采取禁用图像节目。 本文以ubuntu 12.04 desktop为例,如何禁用开机启动X11图像界面,设置成手动启动echo 'manual' | sudo dd of=/etc/init/lightdm.override 即创建了一个lighttdm.override文件,内容为manual. 现在已经禁用了自动启动了。 如果要启动X11图形界面,可使用如下代码sudo service lightdm start 如果要停用sudo service ligh.. 阅读全文
posted @ 2014-03-21 17:20 the wind's words 阅读(2598) 评论(0) 推荐(0) 编辑
摘要: 1. 按照官方文档搭建起来,却无法通过认证,服务器调试信息如下:Ready to process requests.rad_recv: Access-Request packet from host 127.0.0.1 port 54488, id=39, length=77 User-Name = "testing" User-Password = "password" NAS-IP-Address = 127.0.0.1 NAS-Port = 0 Message-Authenticator = 0xb47f65635d266c403fe803e56f 阅读全文
posted @ 2014-01-06 21:30 the wind's words 阅读(14356) 评论(0) 推荐(0) 编辑