青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

posts - 6,  comments - 61,  trackbacks - 0

 

Boost.Asio is a cross-platform C++ library for network programming that provides developers with a consistent asynchronous I/O model using a modern C++ approach.

Boost.Asio是一個跨平臺的C + +庫,它用現代C++方法為網絡編程人員提供一致的異步I/O模型。

 

Using Boost.Asio

How to use Boost.Asio in your applications. Includes information on library dependencies and supported platforms.

如何在你的應用程序中使用Boost.Asio庫,以及關于庫依賴和所支持平臺信息。 

Tutorial

A tutorial that introduces the fundamental concepts required to use Boost.Asio, and shows how to use Boost.Asio to develop simple client and server programs.

介紹使用Boost.Asio必備的基本概念,同時示范如何使用Boost.Aaio開發簡單的客戶端\服務器程序。

Examples

Examples that illustrate the use of Boost.Asio in more complex applications.

更加復雜的應用程序中使用Boost.Asio的示例。

Reference

Detailed class and function reference.

類和函數的詳細參考

Design

Rationale and design information for Boost.Asio.

Boost.Asio庫的基本原理及設計思路。

Supported Platforms

 支持平臺:

The following platforms and compilers have been tested:

已測試的平臺和編譯器:

 

  • Win32 and Win64 using Visual C++ 7.1 and Visual C++ 8.0.
  • Win32 using MinGW.
  • Win32 using Cygwin. (__USE_W32_SOCKETS must be defined.)
  • Linux (2.4 or 2.6 kernels) using g++ 3.3 or later.
  • Solaris using g++ 3.3 or later.
  • Mac OS X 10.4 using g++ 3.3 or later.

The following platforms may also work:

以下的平臺可能也可以使用:

 

  • AIX 5.3 using XL C/C++ v9.
  • HP-UX 11i v3 using patched aC++ A.06.14.
  • QNX Neutrino 6.3 using g++ 3.3 or later.
  • Solaris using Sun Studio 11 or later.
  • Tru64 v5.1 using Compaq C++ v7.1.
  • Win32 using Borland C++ 5.9.2

Dependencies

依賴性:

The following libraries must be available in order to link programs that use Boost.Asio:

以下是使用Boost.Asio 必需的鏈接庫:

 

  • Boost.System for the boost::system::error_code and boost::system::system_error classes.
  • Boost.Regex (optional) if you use any of the read_until() or async_read_until() overloads that take a boost::regex parameter.
  • OpenSSL (optional) if you use Boost.Asio's SSL support.

 

 

Boost.System 中的 boost::system::error_codeboost::system::system_error 類。

Boost.Regex (可選)。read_until() 或 async_read_until() 函數的重載形式都需要 boost::regex 參數。 如果你使用它們,則需要Boost.Regex庫。

OpenSSL (可選) 。如果需要Boost.Asio支持SSL,則需要OpenSSL

 

Furthermore, some of the examples also require the Boost.Thread, Boost.Date_Time or Boost.Serialization libraries.

另外,一些例子需要提供Boost.Thread,Boost.Date_Time 或Boost.Serialization 庫的支持。

 

[Note] Note

With MSVC or Borland C++ you may want to add -DBOOST_DATE_TIME_NO_LIB and -DBOOST_REGEX_NO_LIB to your project settings to disable autolinking of the Boost.Date_Time and Boost.Regex libraries respectively. Alternatively, you may choose to build these libraries and link to them.

 

注意:

使用MSVC或Borland C++,你可能需要在“工程設置”中分別添加 -DBOOST_DATE_TIME_NO_LIB-DBOOST_REGEX_NO_LIB 聲明,分別禁止Boost.Date_Time和Boost.Regex的自動鏈接,當然你也可以這樣做:build這兩個庫,然后鏈接。

Building Boost Libraries

 編譯Boost庫:

You may build the subset of Boost libraries required to use Boost.Asio and its examples by running the following command from the root of the Boost download package:

你可以在下載包的根目錄下執行如下的命令來編譯Boost.Asio所必需的Boost庫子集 


bjam --with-system --with-thread --with-date_time --with-regex --with-serialization stage

This assumes that you have already built bjam. Consult the Boost.Build documentation for more details.

這里假設你已經編譯了bjam。請參考Boost.Build文檔以獲得更多信息。

Macros

The macros listed in the table below may be used to control the behaviour of Boost.Asio.

下表中的宏用來控制Boost.Asio狀態

Macro

Description

BOOST_ASIO_ENABLE_BUFFER_DEBUGGING

Enables Boost.Asio's buffer debugging support, which can help identify when invalid buffers are used in read or write operations (e.g. if a std::string object being written is destroyed before the write operation completes).

When using Microsoft Visual C++, this macro is defined automatically if the compiler's iterator debugging support is enabled, unless BOOST_ASIO_DISABLE_BUFFER_DEBUGGING has been defined.

When using g++, this macro is defined automatically if standard library debugging is enabled (_GLIBCXX_DEBUG is defined), unless BOOST_ASIO_DISABLE_BUFFER_DEBUGGING has been defined.

BOOST_ASIO_DISABLE_BUFFER_DEBUGGING

Explictly disables Boost.Asio's buffer debugging support.

BOOST_ASIO_DISABLE_DEV_POLL

Explicitly disables /dev/poll support on Solaris, forcing the use of a select-based implementation.

BOOST_ASIO_DISABLE_EPOLL

Explicitly disables epoll support on Linux, forcing the use of a select-based implementation.

BOOST_ASIO_DISABLE_KQUEUE

Explicitly disables kqueue support on Mac OS X and BSD variants, forcing the use of a select-based implementation.

BOOST_ASIO_DISABLE_IOCP

Explicitly disables I/O completion ports support on Windows, forcing the use of a select-based implementation.

BOOST_ASIO_NO_WIN32_LEAN_AND_MEAN

By default, Boost.Asio will automatically define WIN32_LEAN_AND_MEAN when compiling for Windows, to minimise the number of Windows SDK header files and features that are included. The presence of BOOST_ASIO_NO_WIN32_LEAN_AND_MEAN prevents WIN32_LEAN_AND_MEAN from being defined.

BOOST_ASIO_NO_DEFAULT_LINKED_LIBS

When compiling for Windows using Microsoft Visual C++ or Borland C++, Boost.Asio will automatically link in the necessary Windows SDK libraries for sockets support (i.e. ws2_32.lib and mswsock.lib, or ws2.lib when building for Windows CE). The BOOST_ASIO_NO_DEFAULT_LINKED_LIBS macro prevents these libraries from being linked.

BOOST_ASIO_SOCKET_STREAMBUF_MAX_ARITY

Determines the maximum number of arguments that may be passed to the basic_socket_streambuf class template's connect member function. Defaults to 5.

BOOST_ASIO_SOCKET_IOSTREAM_MAX_ARITY

Determines the maximum number of arguments that may be passed to the basic_socket_iostream class template's constructor and connect member function. Defaults to 5.

BOOST_ASIO_ENABLE_CANCELIO

Enables use of the CancelIo function on older versions of Windows. If not enabled, calls to cancel() on a socket object will always fail with asio::error::operation_not_supported when run on Windows XP, Windows Server 2003, and earlier versions of Windows. When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used.

The CancelIo function has two issues that should be considered before enabling its use:

* It will only cancel asynchronous operations that were initiated in the current thread.

* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed.

For portable cancellation, consider using one of the following alternatives:

* Disable asio's I/O completion port backend by defining BOOST_ASIO_DISABLE_IOCP.

* Use the socket object's close() function to simultaneously cancel the outstanding operations and close the socket.


Basic Skills

基本技能

The tutorial programs in this first section introduce the fundamental concepts required to use the asio toolkit. Before plunging into the complex world of network programming, these tutorial programs illustrate the basic skills using simple asynchronous timers.

本指南的第一部分主要介紹使用Asio工具包所需要了解的基本概念。在進入復雜網絡編程世界之前,這些示例程序將舉一些使用簡單異步定時器的例子。

 

 

Timer1、使用同步定時器
Timer2、使用異步定時器
Timer3、回調函數綁定參數
Timer4、成員函數作為回調函數
Timer5、多線程回調同步

Introduction to Sockets

介紹套接字

The tutorial programs in this section show how to use asio to develop simple client and server programs. These tutorial programs are based around the daytime protocol, which supports both TCP and UDP.

這部分的實例主要介紹如何使Asio開發簡單的客戶端\服務器程序。這些程序都基于同時支持TCP和UDP協議的daytime協議。

The first three tutorial programs implement the daytime protocol using TCP.

前三個程序用TCP實現daytime協議。

 

 

Daytime1、同步TCP daytime客戶端
Daytime2、同步TCP daytime服務器
Daytime3、異步TCP daytime服務器

The next three tutorial programs implement the daytime protocol using UDP.

接下來的三個程序用UDP實現daytime協議。

 

 

Daytime4、同步UDP daytime客戶端
Daytime5、同步UDP daytime服務器
Daytime6、異步UDP daytime服務器

The last tutorial program in this section demonstrates how asio allows the TCP and UDP servers to be easily combined into a single program.

本部分的最后一個程序演示了asio怎樣將TCPUDP服務器簡易的組合到一個程序里

 

Daytime7、結合了TCP/UDP的同步服務器

posted on 2008-04-20 01:14 王曉軒 閱讀(7949) 評論(1)  編輯 收藏 引用 所屬分類: C\C++
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            99热在线精品观看| 亚洲精品一级| 久久人人97超碰人人澡爱香蕉| 一区二区三区高清在线| 国产欧美va欧美va香蕉在| 久久综合激情| 国产精品成人aaaaa网站| 亚洲色图自拍| 久久五月天婷婷| 欧美一区1区三区3区公司| 久久影院亚洲| 久久福利毛片| 欧美日韩一区二区三区在线| 久久噜噜噜精品国产亚洲综合| 国产一区二区三区免费观看| 99re在线精品| 国自产拍偷拍福利精品免费一| 亚洲美女区一区| 欧美在线观看视频一区二区| 激情欧美日韩一区| 午夜在线观看免费一区| 亚洲视频专区在线| 国产日韩欧美一区在线 | 亚洲美女淫视频| 久久九九热re6这里有精品| 亚洲自拍偷拍网址| 欧美日韩另类国产亚洲欧美一级| 亚洲主播在线| 欧美资源在线观看| 一区二区三区在线视频免费观看| 欧美高清影院| 亚洲第一久久影院| 亚洲专区在线| 欧美黄污视频| 亚洲国产欧美一区二区三区丁香婷| 香蕉久久一区二区不卡无毒影院| 欧美a级片网| 亚洲视频www| 欧美亚洲专区| 欧美一区二区在线| 亚洲精品乱码久久久久久日本蜜臀| 久久精品国产v日韩v亚洲| 久久久久国产成人精品亚洲午夜| 国产精品久久久久秋霞鲁丝| 在线一区二区视频| 欧美影院成年免费版| 亚洲精品美女久久久久| 国产精品一区二区黑丝| 欧美一级午夜免费电影| 日韩视频中午一区| 91久久中文| 午夜国产精品影院在线观看| 国产伦精品一区二区三区视频孕妇 | 一本大道久久精品懂色aⅴ| 欧美成人一区二区三区在线观看| 亚洲精品免费一区二区三区| 国产一区在线观看视频| 久久综合色影院| 午夜精品久久久久久久久久久久久 | 久久精品国产99国产精品| 亚洲一区二区三区色| 久久亚洲一区二区| 久久影视三级福利片| 久久久不卡网国产精品一区| 欧美一区三区三区高中清蜜桃| 欧美一区二区成人6969| 久久精品30| av不卡免费看| 99国产精品自拍| 一区二区三区波多野结衣在线观看| 国产精品日日摸夜夜摸av| 久久美女性网| 久热精品在线视频| 欧美国产一区二区在线观看| 欧美丰满少妇xxxbbb| 欧美精品一区二区三| 午夜精品久久久久影视| 午夜精品一区二区在线观看| 欧美中文字幕视频在线观看| 亚洲午夜小视频| 亚洲一区二区三区影院| 国色天香一区二区| 狠狠色2019综合网| 亚洲人成在线影院| 激情婷婷欧美| 亚洲欧洲一区| 亚洲欧美日韩国产成人| …久久精品99久久香蕉国产| 国产精品白丝av嫩草影院| 国产精品欧美久久| 狠狠色综合色综合网络| 亚洲人成人99网站| 亚洲综合三区| 毛片一区二区三区| 麻豆9191精品国产| 亚洲精品久久久久中文字幕欢迎你| 蜜桃av一区二区三区| 亚洲免费在线观看视频| 久久久久久综合| 亚洲国产裸拍裸体视频在线观看乱了| 久久激情视频免费观看| 亚洲国产精品久久久| 亚洲一区二区三| 久久综合激情| 国产欧美日本一区二区三区| 亚洲另类在线一区| 狂野欧美激情性xxxx| 日韩天堂在线观看| 美女脱光内衣内裤视频久久影院| 欧美中文字幕第一页| 欧美日韩成人精品| 欧美日韩另类一区| 激情一区二区三区| 欧美一区二区精品久久911| 亚洲国内在线| 久久这里只有| 国产精品视频免费观看| 亚洲国产成人久久综合一区| 亚洲国产精品成人久久综合一区 | 99精品热视频| 欧美大色视频| 欧美在线免费一级片| 国产精品久久久久久久免费软件 | 99国产精品久久久久久久成人热 | 国产欧美一区二区精品秋霞影院| 中国成人亚色综合网站| 欧美国产日韩免费| 免费日韩av| 欧美日韩综合在线| 欧美在线观看视频一区二区| 亚洲午夜精品一区二区| 欧美日本二区| 亚洲美女av黄| 亚洲激情综合| 欧美激情一区在线观看| 国产精品每日更新在线播放网址| 亚洲精品在线观看免费| 亚洲大胆视频| 久久一区免费| 亚洲区在线播放| 欧美国产欧美综合 | 欧美精品在线免费观看| 亚洲精品国产精品国自产观看浪潮 | 亚洲欧美高清| 国产日韩在线播放| 欧美在线播放高清精品| 午夜精品视频在线观看| 国产亚洲精品v| 欧美激情国产精品| 欧美理论视频| 欧美一区二区在线播放| 久久成人免费| 亚洲欧洲在线一区| 一区二区黄色| 国内久久视频| 亚洲国产精品一区二区三区| 欧美日韩在线观看视频| 亚洲欧美自拍偷拍| 久久躁狠狠躁夜夜爽| 夜久久久久久| 欧美影院成人| 日韩午夜av电影| 午夜亚洲性色福利视频| 在线成人av| 国产精品99久久久久久久女警 | 国产欧美日韩视频一区二区| 久久久99久久精品女同性| 欧美本精品男人aⅴ天堂| 韩日精品视频一区| 亚洲精品美女| 国模 一区 二区 三区| 亚洲国产精品成人va在线观看| 欧美三级电影大全| 蜜桃精品久久久久久久免费影院| 欧美人交a欧美精品| 欧美激情精品久久久久久久变态 | 国产视频久久| 亚洲国产高清高潮精品美女| 国产精品一区二区久久| 亚洲国产第一页| 欧美国产日产韩国视频| 欧美另类极品videosbest最新版本| 91久久国产综合久久| 亚洲免费视频成人| 亚洲精品123区| 欧美在线三区| 亚洲综合国产激情另类一区| 久热re这里精品视频在线6| 欧美在线高清视频| 欧美天天视频| 亚洲精品韩国| 亚洲日本成人| 久久这里有精品视频| 久久久精品国产免费观看同学| 欧美日韩在线另类| 欧美国产日韩免费| 另类尿喷潮videofree| 国产精品日韩欧美大师| 亚洲人成在线播放| 亚洲精品免费网站|