1[/ 2 / Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 / 4 / Distributed under the Boost Software License, Version 1.0. (See accompanying 5 / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 /] 7 8[section:rationale Rationale] 9 10Most programs interact with the outside world in some way, whether it be via a 11file, a network, a serial cable, or the console. Sometimes, as is the case with 12networking, individual I/O operations can take a long time to complete. This 13poses particular challenges to application development. 14 15Boost.Asio provides the tools to manage these long running operations, without 16requiring programs to use concurrency models based on threads and explicit 17locking. 18 19The Boost.Asio library is intended for programmers using C++ for systems programming, 20where access to operating system functionality such as networking is often 21required. In particular, Boost.Asio addresses the following goals: 22 23* [*Portability.] The library should support a range of commonly used operating 24systems, and provide consistent behaviour across these operating systems. 25 26* [*Scalability.] The library should facilitate the development of network 27applications that scale to thousands of concurrent connections. The library 28implementation for each operating system should use the mechanism that best 29enables this scalability. 30 31* [*Efficiency.] The library should support techniques such as scatter-gather 32I/O, and allow programs to minimise data copying. 33 34* [*Model concepts from established APIs, such as BSD sockets.] The 35BSD socket API is widely implemented and understood, and is covered in much 36literature. Other programming languages often use a similar interface for 37networking APIs. As far as is reasonable, Boost.Asio should leverage existing 38practice. 39 40* [*Ease of use.] The library should provide a lower entry barrier for new 41users by taking a toolkit, rather than framework, approach. That is, it should 42try to minimise the up-front investment in time to just learning a few basic 43rules and guidelines. After that, a library user should only need to understand 44the specific functions that are being used. 45 46* [*Basis for further abstraction.] The library should permit the development 47of other libraries that provide higher levels of abstraction. For example, 48implementations of commonly used protocols such as HTTP. 49 50Although Boost.Asio started life focused primarily on networking, its concepts of 51asynchronous I/O have been extended to include other operating system resources 52such as serial ports, file descriptors, and so on. 53 54[endsect] 55