
Boost.Asio C++ Network Programming
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
- Explore the networking concepts of IP addressing, TCP/IP ports and protocols, and LAN topologies
- Get acquainted with the usage of the Boost libraries
- Get to know more about the content of Boost.Asio network programming and Asynchronous programming
- Establish communication between client and server by creating clientserver application
- Understand the various functions inside Boost.Asio C++ libraries to delve into network programming
- Discover how to debug and run the code successfully
Who this book is forThis book is for C++ Network programmers with basic knowledge of network programming, but no knowledge of how to use Boost.Asio for network programming.
All prices
More details
Other editions
Additional editions

Person
Wisnu Anggoro is a Microsoft Certified Professional in C# programming and an experienced C/C++ developer. He has also authored the books Boost.Asio C++ Network Programming - Second Edition and Functional C# by Packt. He has been programming since he was in junior high school, which was about 20 years ago, and started developing computer applications using the BASIC programming language in the MS-DOS environment. He has solid experience in smart card programming, as well as desktop and web application programming, including designing, developing, and supporting the use of applications for SIM Card Operating System Porting, personalization, PC/SC communication, and other smart card applications that require the use of C# and C/C++. He is currently a senior smart card software engineer at CIPTA, an Indonesian company that specializes in innovation and technology for smart cards. He can be reached through his email at wisnu@anggoro.net
Content
- Cover
- Copyright
- Credits
- About the Authors
- Acknowledgements
- About the Reviewers
- www.PacktPub.com
- Table of Contents
- Preface
- Chapter 1: Simplifying Your Network Programming in C++
- Setting up the MinGW compiler and Text Editor
- Installing MinGW-w64
- Setting up the Path environment
- Choosing and installing the Text Editor
- Using the GCC C++ compiler
- Compiling a C++ program
- Compiling multiple source files
- Compiling and linking a program separately
- Detecting a warning in the C++ program
- Knowing other important options in the GCC C++ compiler
- Troubleshooting in the GCC C++ compiler
- Help for command-line options
- Version numbers
- The verbose compilation
- Summary
- Chapter 2: Understanding the Networking Concepts
- An introduction to networking systems
- The OSI reference model
- The Physical layer
- The Data Link layer
- The Network layer
- The Transport layer
- The Session layer
- The Presentation layer
- The Application layer
- The TCP/IP reference model
- Understanding TCP and UDP
- Transmission Control Protocol
- User Datagram Protocol
- Understanding ports
- Exploring the Internet Protocol
- Internet Protocol Version 4 - IPv4
- Internet Protocol Version 6 - IPv6
- Using TCP/IP tools for troubleshooting
- The ipconfig command
- Displaying the full configuration information
- Displaying DNS
- Flushing DNS
- Renewing the IP address
- Releasing the IP address
- The ping command
- The tracert command
- The pathping command
- The netstat command
- The telnet command
- Summary
- Chapter 3: Introducing the Boost C++ Libraries
- Introducing the C++ standard template library
- Introducing the Boost C++ libraries
- Advantages of Boost libraries
- Preparing Boost libraries for the MinGW compiler
- Downloading Boost libraries
- Deploying Boost libraries
- Using Boost libraries
- Building Boost libraries
- Summary
- Chapter 4: Getting Started with Boost.Asio
- Getting closer to the Boost.Asio library
- Examining the I/O service in the Boost.Asio library
- Using and blocking the run() function
- Using the non-blocking poll() function
- Removing the work object
- Dealing with many threads
- Understanding the Boost.Bind library
- Wrapping a function invocation
- Working with the Boost.Bind library
- Synchronizing data access with the Boost.Mutex library
- Giving some work to the I/O service
- Using the post() function
- Using the dispatch() function
- Summary
- Chapter 5: Delving into the Boost.Asio Library
- Serializing the I/O service work
- Using the strand function
- Wrapping a handler through the strand object
- Handling exceptions and errors
- Handling an exception
- Handling an error
- Timing the work execution using the timer class
- An expiring timer
- Using the timer along with the boost::bind function
- Using the timer along with the boost::strand function
- Summary
- Chapter 6: Creating a Client-server Application
- Establishing a connection
- A synchronous client
- An asynchronous client
- An asynchronous server
- Reading and writing to the socket
- The Send() and OnSend() functions
- The Recv() and OnRecv() functions
- Wrapping the network code
- Developing a client and server program
- Creating a simple echo server
- Creating a simple client program
- Summary
- Chapter 7: Debugging the Code and Solving the Error
- Choosing a debugging tool
- Installing a debugging tool
- Preparing a file for debugging
- Running the program under GDB
- Starting the debugging process
- The continuing and stepping debugging process
- Printing the source code
- Setting and deleting the breakpoint
- Printing a variable value
- Modifying a variable value
- Calling the command prompt
- Solving the error
- What's next?
- Summary
- Index
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.