diff options
| author | Dennis Brentjes <d.brentjes@gmail.com> | 2016-10-13 14:35:32 +0200 |
|---|---|---|
| committer | Dennis Brentjes <d.brentjes@gmail.com> | 2016-10-13 14:35:32 +0200 |
| commit | 366bae00016bfbfdd354ab010555c2927505b2b2 (patch) | |
| tree | e329c2ff179f62f093c6c53f84fb8faf4f5fccce /libcmix-common/senderreceiver.hpp | |
| parent | d9587cfd27aa5ef26170ec1983b47f1e26dc8136 (diff) | |
| download | cmix-366bae00016bfbfdd354ab010555c2927505b2b2.tar.gz cmix-366bae00016bfbfdd354ab010555c2927505b2b2.tar.bz2 cmix-366bae00016bfbfdd354ab010555c2927505b2b2.zip | |
Second big network rewrite.
This time without the ugly SFINAE hack to restrict sending and receiving
on Senders and Receivers respectively. Replaced this hack with private
inheritance and using declerations.
Also renamed receive to async_receive to better reflect the behaviour.
Diffstat (limited to 'libcmix-common/senderreceiver.hpp')
| -rw-r--r-- | libcmix-common/senderreceiver.hpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/libcmix-common/senderreceiver.hpp b/libcmix-common/senderreceiver.hpp new file mode 100644 index 0000000..9a07f78 --- /dev/null +++ b/libcmix-common/senderreceiver.hpp @@ -0,0 +1,28 @@ +#pragma once + +#include "cmixprotofunctor.hpp" +#include "receiver.hpp" +#include "sender.hpp" + +#include "protobufclient.hpp" + +struct SenderReceiver : private ProtobufClient<CMixProtoFunctor> +{ + explicit SenderReceiver(Receiver&& r); + + explicit SenderReceiver(Sender&& s); + + using ProtobufClient::ProtobufClient; + + using ProtobufClient::async_receive; + + using ProtobufClient::async_send; + + using ProtobufClient::async_connect; + + using ProtobufClient::close; + + using ProtobufClient::on_done; + + using ProtobufClient::is_open; +};
\ No newline at end of file |
