Chops Net IP
Loading...
Searching...
No Matches

Common code, factored out, for TCP and UDP io handlers. More...

#include <optional>
#include <mutex>
#include "net_ip/detail/output_queue.hpp"
#include "net_ip/queue_stats.hpp"
Include dependency graph for io_common.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  chops::net::detail::io_common< E >
 

Detailed Description

Common code, factored out, for TCP and UDP io handlers.

The common code includes an IO started flag and output queue management. The implementation currently uses a std::mutex to protect concurrent access, but other designs are possible, including asio post for writes, or various combinations of a lock-free MPSC queue and std::atomic variables.

Note
For internal use only.
Author
Cliff Green

Copyright (c) 2017-2019 by Cliff Green

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt)