summaryrefslogtreecommitdiff
path: root/2005/i/robert/src/proto/test_proto.cc
diff options
context:
space:
mode:
authorhaller2005-04-09 22:42:58 +0000
committerhaller2005-04-09 22:42:58 +0000
commit98f2eebf37b6bed5797a35f45039e9da7542e1df (patch)
tree105af03961c1373a88b2cd061efaa4e3092b186e /2005/i/robert/src/proto/test_proto.cc
parentcbdfded9991dc3e01da3f70cd81b854694c0f769 (diff)
Corrections de quelques bugs
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;
}