io wrapper ammended. random build file added
parent
568ad71ca6
commit
7a26e2f4df
|
@ -1,25 +1,27 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "async.h"
|
#include "async.h"
|
||||||
|
#include "message.h"
|
||||||
#include "io.h"
|
#include "io.h"
|
||||||
|
|
||||||
namespace saw {
|
namespace saw {
|
||||||
|
|
||||||
template <typename Codec, typename Incoming, typename Outgoing>
|
template <typename Codec, typename Incoming, typename Outgoing, class InContainer = MessageContainer<Incoming>, class OutContainer = MessageContainer<Outgoing>>
|
||||||
class StreamingIoPeer {
|
class StreamingIoPeer {
|
||||||
private:
|
private:
|
||||||
Codec codec;
|
Codec codec;
|
||||||
|
|
||||||
Own<AsyncIoStream> io_stream;
|
Own<AsyncIoStream> io_stream;
|
||||||
|
|
||||||
Own<ConveyorFeeder<Incoming>> incoming_feeder = nullptr;
|
Own<ConveyorFeeder<HeapMessageRoot<Incoming, InContainer>>> incoming_feeder = nullptr;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
StreamingIoPeer(Own<AsyncIoStream> stream);
|
StreamingIoPeer(Own<AsyncIoStream> stream);
|
||||||
|
|
||||||
void send(Outgoing outgoing, Own<MessageBuilder> builder);
|
void send(HeapMessageRoot<Outgoing, OutContainer> builder);
|
||||||
|
|
||||||
Conveyor<Incoming> startReadPump();
|
Conveyor<HeapMessageRootIncoming> startReadPump();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace saw
|
|
||||||
|
|
||||||
|
} // namespace saw
|
||||||
|
|
Loading…
Reference in New Issue