摘要:
//// 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
阅读(1502)评论(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
阅读(749)评论(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
阅读(766)评论(0)推荐(0)