summaryrefslogtreecommitdiff
path: root/modules/io_codec/c++/io_peer.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/io_codec/c++/io_peer.hpp')
-rw-r--r--modules/io_codec/c++/io_peer.hpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/modules/io_codec/c++/io_peer.hpp b/modules/io_codec/c++/io_peer.hpp
index 0cb3959..d29c7b8 100644
--- a/modules/io_codec/c++/io_peer.hpp
+++ b/modules/io_codec/c++/io_peer.hpp
@@ -10,6 +10,7 @@ namespace saw {
template <typename Incoming, typename Outgoing,
typename TransportEncoding, typename ContentEncoding,
+ typename Net = net::Os,
typename BufferT = ring_buffer>
class streaming_io_peer {
private:
@@ -20,14 +21,14 @@ public:
*/
streaming_io_peer(
own<conveyor_feeder<data<Incoming, ContentEncoding>>> feed,
- own<async_io_stream> stream, transport<TransportEncoding> in_codec);
+ own<async_io_stream<Net>> stream, transport<TransportEncoding> in_codec);
/**
* Constructor with mostly default assignements
*/
streaming_io_peer(
own<conveyor_feeder<data<Incoming, ContentEncoding>>> feed,
- own<async_io_stream> stream);
+ own<async_io_stream<Net>> stream);
/**
* Deleted copy and move constructors
@@ -54,8 +55,8 @@ private:
: public conveyor_feeder<data<Outgoing, ContentEncoding>> {
public:
peer_conveyor_feeder(
- streaming_io_peer<Incoming, Outgoing, TransportEncoding, ContentEncoding, BufferT> &peer_)
- : peer_{peer_} {}
+ streaming_io_peer<Incoming, Outgoing, TransportEncoding, ContentEncoding, Net, BufferT> &peer__)
+ : peer_{peer__} {}
void feed(data<Outgoing, ContentEncoding> &&data_) override {
(void)data_;
@@ -69,7 +70,7 @@ private:
error_or<void> swap(conveyor<data<Outgoing, ContentEncoding>> &&) noexcept override { return make_error<err::not_implemented>();}
private:
- streaming_io_peer<Incoming, Outgoing, TransportEncoding, ContentEncoding,
+ streaming_io_peer<Incoming, Outgoing, TransportEncoding, ContentEncoding, Net,
BufferT> &peer_;
};
@@ -77,7 +78,7 @@ private:
own<conveyor_feeder<data<Incoming, ContentEncoding>>>
incoming_feeder_ = nullptr;
- own<async_io_stream> io_stream_;
+ own<async_io_stream<Net>> io_stream_;
transport<TransportEncoding> in_codec_;
@@ -99,10 +100,11 @@ private:
*/
template <typename Incoming, typename Outgoing,
typename TransportEncoding, typename ContentEncoding,
+ typename Net = net::Os,
typename BufferT = ring_buffer>
-std::pair<own<streaming_io_peer<Incoming, Outgoing, TransportEncoding, ContentEncoding, BufferT>>,
+std::pair<own<streaming_io_peer<Incoming, Outgoing, TransportEncoding, ContentEncoding, Net, BufferT>>,
conveyor<data<Incoming, ContentEncoding>>>
-new_streaming_io_peer(own<async_io_stream> stream);
+new_streaming_io_peer(own<async_io_stream<Net>> stream);
} // namespace saw