Boost.Asio C++ Network Programming
暫譯: Boost.Asio C++ 網路程式設計

John Torjo

  • 出版商: Packt Publishing
  • 出版日期: 2013-02-22
  • 售價: $1,540
  • 貴賓價: 9.5$1,463
  • 語言: 英文
  • 頁數: 156
  • 裝訂: Paperback
  • ISBN: 1782163263
  • ISBN-13: 9781782163268
  • 相關分類: C++ 程式語言
  • 海外代購書籍(需單獨結帳)

商品描述

Enhance your skills with practical examples for C++ network programming

Overview

  • Augment your C++ network programming using Boost.Asio
  • Discover how Boost.Asio handles synchronous and asynchronous programming models.
  • Practical examples of client/server applications.
  • Learn how to deal with threading when writing network applications.
  • Harness the power of Boost with plenty of examples that you can build upon.

In Detail

Network programming is not new and it's no secret that it's not an easy task. Boost.Asio provides an excellent level of abstraction, making sure that with a minimal amount of coding you can create beautiful client/server applications, and have fun in the process!.

"Boost.Asio C++ Network Programming" shows how to build client/server applications using a library that is part of the popular peer-reviewed Boost C++ Libraries. It analyzes whether you should go synchronous or asynchronous and the role that threading plays, whilst providing examples you can run and extend for yourself.

After covering the fundamentals of Boost.Asio you'll discover how you can build synchronous and asynchronous clients and servers. You will also see how you can have your own asynchronous functions play nice with Boost.Asio. As a bonus, we will introduce co-routines, which make asynchronous programming a piece of cake. Nowadays, network programming is a must, no matter what type of programmer you are. "Boost.Asio C++ Network Programming" shows just how simple networking can be, if you’re using the right tools.

What you will learn from this book

  • How to easily reference Boost.Asio programming.
  • Synchronous versus asynchronous using Boost.Asio.
  • How threading affects programming using Boost.Asio.
  • Create your own echo client and server.
  • More examples of client/server applications, both synchronous and asynchronous.
  • Implement your own asynchronous operations.
  • Co-routines: asynchronous operations with a synchronous feel.
  • Use Boost.Asio for SSL Networking.
  • Debug Boost.Asio.
  • Use Boost.Asio for more than just networking.

Approach

What you want is an easy level of abstraction, which is just what this book provides in conjunction with Boost.Asio. Switching to Boost.Asio is just a few extra #include directives away, with the help of this practical and engaging guide.

Who this book is written for

This book is great for developers that need to do network programming, who don't want to delve into the complicated issues of a raw networking API. You should be familiar with core Boost concepts, such as smart pointers and shared_from_this, resource classes (noncopyable), functors and boost::bind, boost mutexes, and the boost date/time library. Readers should also be familiar with "blocking" versus "non-blocking" operations.

商品描述(中文翻譯)

增強您的技能,透過 C++ 網路程式設計的實用範例

概述
- 使用 Boost.Asio 增強您的 C++ 網路程式設計
- 探索 Boost.Asio 如何處理同步和非同步程式設計模型
- 客戶端/伺服器應用程式的實用範例
- 學習在撰寫網路應用程式時如何處理執行緒
- 利用大量範例發揮 Boost 的威力,讓您可以進一步擴展

詳細內容
網路程式設計並不新鮮,且眾所周知這並不是一項簡單的任務。Boost.Asio 提供了優秀的抽象層級,確保您可以用最少的程式碼創建美觀的客戶端/伺服器應用程式,並在過程中享受樂趣!

《Boost.Asio C++ 網路程式設計》展示了如何使用這個流行的經過同行評審的 Boost C++ 函式庫來構建客戶端/伺服器應用程式。它分析了您應該選擇同步還是非同步,以及執行緒在其中的角色,同時提供您可以運行和擴展的範例。

在涵蓋 Boost.Asio 的基本概念後,您將發現如何構建同步和非同步的客戶端和伺服器。您還將看到如何讓自己的非同步函式與 Boost.Asio 和諧共存。作為額外的內容,我們將介紹協程(co-routines),使非同步程式設計變得輕而易舉。如今,無論您是什麼類型的程式設計師,網路程式設計都是必須的。《Boost.Asio C++ 網路程式設計》展示了如果使用正確的工具,網路程式設計可以是多麼簡單。

您將從本書中學到的內容
- 如何輕鬆參考 Boost.Asio 程式設計
- 使用 Boost.Asio 的同步與非同步
- 執行緒如何影響使用 Boost.Asio 的程式設計
- 創建自己的回音客戶端和伺服器
- 更多的客戶端/伺服器應用程式範例,包括同步和非同步
- 實現自己的非同步操作
- 協程:具有同步感的非同步操作
- 使用 Boost.Asio 進行 SSL 網路連接
- 除了網路外,調試 Boost.Asio
- 使用 Boost.Asio 進行不僅限於網路的操作

方法
您所需要的是一個簡單的抽象層級,而這正是本書與 Boost.Asio 結合所提供的。轉向 Boost.Asio 只需幾個額外的 #include 指令,借助這本實用且引人入勝的指南即可輕鬆實現。

本書的讀者對象
本書非常適合需要進行網路程式設計的開發人員,這些開發人員不想深入複雜的原始網路 API 問題。您應該熟悉核心 Boost 概念,例如智能指標和 shared_from_this、資源類別(不可複製)、函式物件和 boost::bind、boost 互斥鎖以及 boost 日期/時間函式庫。讀者還應該熟悉「阻塞」與「非阻塞」操作。