diff options
author | Pierre Gabin FODOP GUMETE <gabinfodop@gmail.com> | 2019-01-30 15:33:12 +0100 |
---|---|---|
committer | Jose Bollo <jose.bollo@iot.bzh> | 2019-11-27 09:07:44 +0100 |
commit | 0f7afc5f1de4a30bb1ea823a3af608e83fc397c2 (patch) | |
tree | 3c24c30621a321b445f38f30e1e898e29cdf88ff /src/afb-wsj1-test.cpp | |
parent | 9a623c3aa32ec0fbf9682f37a990abd00f38da60 (diff) |
IN PROGRESS: add C++ websocket client APIsandbox/jobol/wscpp
Diffstat (limited to 'src/afb-wsj1-test.cpp')
-rw-r--r-- | src/afb-wsj1-test.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/afb-wsj1-test.cpp b/src/afb-wsj1-test.cpp new file mode 100644 index 00000000..ff74b4b9 --- /dev/null +++ b/src/afb-wsj1-test.cpp @@ -0,0 +1,19 @@ +#include "afb-wsj1.hpp" + +void onreply(const char *value){ + std::cout << value << std::endl; + exit(0); +} + +int main(int ac, char **av){ + char*uri=av[1]; + char*api =av[2]; + char*verb =av[3]; + char*req =av[4]; + afb::wsj1 sj1; + char *x; + sj1.connect(uri); + sj1.call(api,verb,req,onreply); + std::cin>> x; + return EXIT_SUCCESS; +}
\ No newline at end of file |