Fray Engine
Loading...
Searching...
No Matches
ipc_manager.hpp File Reference
#include <boost/asio.hpp>
#include <array>
#include <set>
#include <vector>
#include <algorithm>
#include <atomic>
#include <deque>
#include <new>
#include <stdexcept>
#include <condition_variable>
#include <functional>
#include <map>
#include <mutex>
#include <limits>
#include <string>
#include "errors.hpp"
#include "log_manager.hpp"
#include "message.hpp"
#include "message_router.hpp"
#include "neighbor_monitor.hpp"
#include "outgoing_router.hpp"
#include "thread_manager.hpp"
#include "types.hpp"
#include "fray_manager.hpp"
#include "fray_message_handler.hpp"

Go to the source code of this file.

Classes

class  fray::ipc::TCPServer
 Listens on one TCP port and exchanges frames with the connected clients. All members and handlers run on the network thread (the thread running the io_context); the only exceptions are the constructor/destructor and port(). Shared ownership keeps it alive while async operations are pending. More...
class  fray::ipc::IPCManager
 Owns the TCP servers and the threads around them. More...

Namespaces

namespace  fray
namespace  fray::ipc

Typedefs

using fray::ipc::Frame = std::shared_ptr<const std::vector<F_uchar>>
 Shared, immutable, fully built frame (prefix + header + payload); shared between threads without copying.
using fray::ipc::Socket = std::shared_ptr<boost::asio::ip::tcp::socket>
 Shared TCP client socket; only the network thread may use it.
using fray::ipc::ConnectionHandler = std::function<void(Socket)>
 Callback invoked on the network thread with each newly accepted client socket.
using fray::ipc::TCPServerSP = std::shared_ptr<TCPServer>
 Shared pointer to a TCPServer.