summaryrefslogtreecommitdiff
path: root/2005/i/robert/src/proto/test_proto.cc
diff options
context:
space:
mode:
Diffstat (limited to '2005/i/robert/src/proto/test_proto.cc')
-rw-r--r--2005/i/robert/src/proto/test_proto.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/2005/i/robert/src/proto/test_proto.cc b/2005/i/robert/src/proto/test_proto.cc
index 710db05..c5bcd0d 100644
--- a/2005/i/robert/src/proto/test_proto.cc
+++ b/2005/i/robert/src/proto/test_proto.cc
@@ -27,16 +27,33 @@
#include <iostream>
#include <exception>
+class chier : public Proto::Receiver
+{
+ void receive(char command, const Proto::Frame &frame)
+ {
+ std::cout << "J'ai reçu en commande:" << command << std::endl;
+ std::cout << "J'ai reçu en arg:" << std::endl;
+ for(std::vector<uint8_t>::const_iterator it = frame.args.begin(); it != frame.args.end(); it++)
+ std::cout << static_cast<int>(*it) << std::endl;
+ }
+};
+
int
main (int argc, char **argv)
{
try
{
+ std::cout << "chier partout!!" << std::endl;
}
catch (const std::exception &e)
{
std::cerr << e.what () << std::endl;
return 1;
}
+
+ chier ch;
+ Proto chieri(ch);
+ chieri.open("-");
+ chieri.send('a', "bb", 3, 4);
return 0;
}