From a14896f9ed209dd3f9597722e5a5697bd7dbf531 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Mon, 4 Dec 2023 12:18:14 +0100 Subject: meta: Renamed folder containing source --- c++/io_codec/io_peer.h | 104 ------------------------------------------------- 1 file changed, 104 deletions(-) delete mode 100644 c++/io_codec/io_peer.h (limited to 'c++/io_codec/io_peer.h') diff --git a/c++/io_codec/io_peer.h b/c++/io_codec/io_peer.h deleted file mode 100644 index b9a4b34..0000000 --- a/c++/io_codec/io_peer.h +++ /dev/null @@ -1,104 +0,0 @@ -#pragma once - -#include -#include -#include -#include - -namespace saw { - -template , - typename OutContainer = message_container, - typename BufferT = ring_buffer> -class streaming_io_peer { -public: - /** - * - */ - streaming_io_peer( - own>> feed, - own stream, Codec codec, BufferT in, BufferT out); - /** - * - */ - streaming_io_peer( - own>> feed, - own stream); - - /** - * Deleted copy and move constructors - */ - SAW_FORBID_COPY(streaming_io_peer); - SAW_FORBID_MOVE(streaming_io_peer); - - /** - * Send a message to the remote peer - */ - error send(heap_message_root builder); - - /** - * A phantom conveyor feeder. Meant for interfacing with other components - */ - conveyor_feeder> &feeder(); - - conveyor on_read_disconnected(); - -private: - /// @unimplemented - class peer_conveyor_feeder final - : public conveyor_feeder> { - public: - peer_conveyor_feeder( - streaming_io_peer &peer_) - : peer_{peer_} {} - - void feed(heap_message_root &&data) override { - (void)data; - } - - void fail(error &&error) override { (void)error; } - - size_t space() const override { return 0; } - - size_t queued() const override { return 0; } - - private: - streaming_io_peer &peer_; - }; - -private: - own>> - incoming_feeder_ = nullptr; - - own io_stream_; - - Codec codec_; - - BufferT in_buffer_; - BufferT out_buffer_; - - conveyor_sink sink_read_; - conveyor_sink sink_write_; - - peer_conveyor_feeder conveyor_feeder_; -}; - -/** - * Setup new streaming io peer with the provided network protocols. - * This is a convenience wrapper intended for a faster setup of this class - */ -template , - typename OutContainer = message_container, - typename BufferT = ring_buffer> -std::pair>, - conveyor>> -new_streaming_io_peer(own stream); - -} // namespace saw - -#include "io_peer.tmpl.h" -- cgit v1.2.3