Commit Graph

61 Commits

Author SHA1 Message Date
Benjamin Sergeant
7e521e38ef Windows ws build fix 2020-01-07 17:37:38 -08:00
Benjamin Sergeant
162e228b34 (ws send) add option (-x) to disable per message deflate compression 2020-01-04 15:08:36 -08:00
Benjamin Sergeant
e34d960b28 fix typo in ws embedded help 2020-01-04 14:37:53 -08:00
Benjamin Sergeant
ac0c218455 clang-format 2019-12-30 08:46:18 -08:00
Benjamin Sergeant
c4e9abfe80 (ws cobra to sentry) bound the queue size used to hold up cobra messages before they are sent to sentry. Default queue size is a 100 messages. Without such limit the program runs out of memory when a subscriber receive a lot of messages that cannot make it to sentry 2019-12-25 22:15:57 -08:00
Benjamin Sergeant
e13b57c73b (ws client) all commands use spdlog instead of std::cerr or std::cout for logging 2019-12-24 21:55:34 -08:00
Benjamin Sergeant
52221906f6 (cobra) Add TLS options to all cobra commands and classes. Add example to the doc. 2019-12-19 20:49:28 -08:00
Benjamin Sergeant
2d593dd63b ws cobra subcommands / channel is not a positional argument anymore 2019-11-28 15:17:13 -08:00
Benjamin Sergeant
6054dd4b49 (http client) Add support for multipart HTTP POST upload + (ixsentry) Add support for uploading a minidump to sentry 2019-11-25 21:11:11 -08:00
Benjamin Sergeant
c26c3b6892 document new proxy command 2019-11-15 17:18:32 -08:00
Benjamin Sergeant
0841fcec44 add stub code for ws proxy server 2019-11-15 14:30:20 -08:00
Benjamin Sergeant
91a95dc5f6 remove unused quiet argument of ws cobra_metrics_to_redis command 2019-10-25 14:02:56 -07:00
Benjamin Sergeant
c40033b6d9 Add cobra_metrics_to_redis sub-command to create streams for each cobra metric event being received. 2019-10-24 14:42:36 -07:00
Benjamin Sergeant
0e9cf863cf Add client support for websocket subprotocol. Look for the new addSubProtocol method for details 2019-10-13 13:37:34 -07:00
Benjamin Sergeant
19150115bb ws: Signal handling code isn't include on Windows 2019-10-01 16:12:32 -07:00
Benjamin Sergeant
de87fa34dc Implement SSL server with OpenSSL backend / still flaky 2019-10-01 15:43:37 -07:00
Benjamin Sergeant
d60f5de231 Add --tls option to pass to ws server command, to enable/disable tls 2019-10-01 13:54:46 -07:00
Benjamin Sergeant
e023dd9c36 ws has a --version option 2019-09-30 17:31:33 -07:00
Benjamin Sergeant
4de7cb191b most ws command take tls options, no-op for now (contributed by Matt DeBoer) 2019-09-29 18:29:51 -07:00
Benjamin Sergeant
7495c9ebb8 Http server: add options to ws https to redirect all requests to a given url. 2019-09-26 09:10:30 -07:00
Benjamin Sergeant
fbf80f4ab1 Add simple Redis Server which is only capable of doing publish / subscribe. New ws redis_server sub-command to use it. The server is used in the unittest, so that we can run on CI in environment where redis isn not available like github actions env. 2019-09-23 21:04:01 -07:00
Benjamin Sergeant
6f2fe49a7b reformat everything with clang-format 2019-09-23 10:25:23 -07:00
Benjamin Sergeant
a7cf151639 In DNS lookup code, make sure the weak pointer we use lives through the expected scope (if branch) 2019-09-19 12:51:11 -07:00
Benjamin Sergeant
8ec2ef345c quiet mode 2019-09-01 10:45:51 -07:00
Benjamin Sergeant
10dbe2d44d +add utf-8 validation code, not hooked up properly yet
+ws autobahn / Add code to test websocket client compliance with the autobahn test-suite
+Ping received with a payload too large (> 125 bytes) trigger a connection closure
+cobra / add tracking about published messages
+cobra / publish returns a message id, that can be used when
+cobra / new message type in the message received handler when publish/ok is received (can be used to implement an ack system).
2019-08-31 16:47:10 -07:00
Benjamin Sergeant
06bc795133
New option to cap the max wait between reconnection attempts. Still default to 10s. (setMaxWaitBetweenReconnectionRetries) (#108) 2019-08-30 12:46:35 -07:00
Benjamin Sergeant
45d7bb34d7 ws connect has a new option to send HTTP headers + use WebSocketHttpHeaders instead of unordered_map<string, string> 2019-08-26 10:19:09 -07:00
Benjamin Sergeant
f8fef833b8 new options for cobra commands
- ws cobra_subscribe has a new -q (quiet) option
- ws cobra_subscribe knows to and display msg stats (count and # of messages received per second)
- ws cobra_subscribe, cobra_to_statsd and cobra_to_sentry commands have a new option, --filter to restrict the events they want to receive
2019-08-01 15:22:24 -07:00
Benjamin Sergeant
fc4068f2e5 ws connect command has a new option to send in binary mode (still default to text) 2019-07-25 15:48:45 -07:00
Benjamin Sergeant
691502d7ad
Feature/httpd (#94)
* Stub code for http server

* can send a response, cannot process body yet

* write headers to the response

* remove commented code

* add simple test + set default http handler

* tweak CI + unittest

* add missing file

* rewrite http::trim in a simple way

* doc
2019-06-23 14:54:21 -07:00
Benjamin Sergeant
5cb72dce4c ws echo_server has a -g option to print a greeting message on connect 2019-06-08 09:16:33 -07:00
Benjamin Sergeant
cbf21b4008 add an option to easily disable per message deflate compression 2019-06-06 13:48:53 -07:00
Benjamin Sergeant
fa84ade6be
Feature/ws windows (#86)
* try to build ws on window on travis 📮

* cmake invocation fixed on windows 🐝

* Can use mbedtls to calculate hmac + no openssl config option

* build only windows on travis 🕢

* run msbuild 💷

* proper command to build 🕛

* some build fixes

* change weird sizeof call 🐙

* warning and missing includes fixes 💮

* ifdef out statsd code on windows 🐍

* logic invertion in ifdef 👄

* bring back makefile 📜

* command line tool is built with mbedtls 🏥
2019-06-02 20:46:20 -07:00
Benjamin Sergeant
ff81f5b496 add env var to display the ws command typed in 2019-05-10 16:27:23 -07:00
Benjamin Sergeant
c7f0bf3d64 use spdlog for logging in ws + unittest + remove un-needed mutex 2019-05-09 15:30:44 -07:00
Benjamin Sergeant
234ce4c173 cout -> cerr 2019-05-09 15:06:42 -07:00
Benjamin Sergeant
28c3f2ea26 IXCobraMetricsThreadedPublisher.cpp uses a lambda to log instead of std::cerr 2019-05-08 18:53:32 -07:00
Benjamin Sergeant
8dc132dbd3 change default ports for the ws command line tool 2019-05-08 13:56:42 -07:00
Benjamin Sergeant
705e0823cb ws connect mode / add a flag to disable automatic reconnection, not hooked up yet 2019-04-29 14:31:29 -07:00
Benjamin Sergeant
0a7157655b initialize netSystem (aka winsock on windows) explicitely 2019-04-25 16:38:15 -07:00
Benjamin Sergeant
c85d5da111 add example websocket C++ server snake which supports basic cobra ops (publish and subscribe without stream sql 2019-04-22 17:33:45 -07:00
Benjamin Sergeant
f85c5002b7 add cobra metrics publisher 2019-04-21 11:16:33 -07:00
Benjamin Sergeant
56f164ce2b fix warning / ws_cobra_subscribe does not need a verbose flag 2019-04-19 11:45:42 -07:00
Benjamin Sergeant
fbf80b9f50 ws: new command to subscribe to a cobra server and send an event to a sentry server 2019-04-11 16:03:05 -07:00
Benjamin Sergeant
c2a9139d41 (ws) add subcommands: cobra subscribe, and cobra subscribe to statsd bridge 2019-04-08 21:56:01 -07:00
Benjamin Sergeant
497373d976 ws redis command improvements + test script 2019-03-27 13:41:46 -07:00
Benjamin Sergeant
91198aca0d (ws) redis_subscribe and redis_publish can take a password + display subscribe response 2019-03-26 09:33:22 -07:00
Benjamin Sergeant
e77b9176f3
Feature/redis (#23)
* Fix warning

* (cmake) add a warning about 32/64 conversion problems.

* simple redis clients

* can publish to redis

* redis subscribe

* display messages received per second

* verbose flag

* (cmake) use clang only compile option -Wshorten-64-to-32 when compiling with clang
2019-03-20 14:29:02 -07:00
Benjamin Sergeant
fead661ab7 workaround bug in Socket::isReadyToWrite 2019-03-18 20:37:33 -07:00
Benjamin Sergeant
2a90e3f478 when trying to flush the send buffer, use select to wait until it is possible instead of using sleep to retry at a given frequency 2019-03-18 14:25:27 -07:00