Benjamin Sergeant
2e904801a0
(ixbots) add new class to configure a bot to simplify passing options around
2020-05-12 19:08:16 -07:00
Benjamin Sergeant
0772ef7ef5
(cobra bots) add a --heartbeat_timeout option to specify when the bot should terminate because no events are received
2020-05-06 22:01:48 -07:00
Benjamin Sergeant
2786631e3b
clang-format
2020-05-04 17:19:25 -07:00
Benjamin Sergeant
af003fc79b
(ixbots) fix tsan data race error when accessing verbose parameter
2020-05-04 17:15:35 -07:00
Benjamin Sergeant
4f17cd5e74
(cobra bots) do not use a queue to store messages pending processing, let the bot handle queuing
2020-05-04 15:45:11 -07:00
Benjamin Sergeant
646b18bf28
core logger support multiple level + switch ixbots to user corelogger instead of spdlog
2020-04-24 15:17:50 -07:00
Benjamin Sergeant
c70f1d09a8
include all ssl backends inside special per backend macro
2020-04-24 12:47:47 -07:00
Benjamin Sergeant
9d79596629
(ixbots) display sent/receive message, per seconds as accumulated
2020-04-17 09:56:09 -07:00
Benjamin Sergeant
0b6fd989f5
(ws) add a --logfile option to configure all logs to go to a file
2020-04-17 09:35:47 -07:00
Benjamin Sergeant
a2abe861d3
(cobra bots) add a utility class to factor out the common bots features (heartbeat) and move all bots to used it + convert cobra_subscribe to be a bot and add a unittest for it
2020-04-16 21:58:10 -07:00
Benjamin Sergeant
bea582c208
cobra subscriber in fluentd mode insert a created_at timestamp entry
2020-04-14 15:30:30 -07:00
Benjamin Sergeant
c57cf413fb
(ws) add a --runtime option to ws cobra_subscribe to optionally limit how much time it will run
2020-04-13 19:03:53 -07:00
Benjamin Sergeant
1d3db5f75b
(cobra to statsd bot) add ability to extract a numerical value and send a timer event to statsd, with the --timer option
2020-03-30 16:08:47 -07:00
Benjamin Sergeant
e465f7af52
(cobra to statsd bot) bot init was missing + capture socket error
2020-03-29 22:03:27 -07:00
Benjamin Sergeant
f8bf1fe7cd
(cobra to statsd bot) add ability to extract a numerical value and send a gauge event to statsd
2020-03-29 19:32:43 -07:00
Benjamin Sergeant
a0ffb2ba53
cobra to statsd bot ported to windows + add unittest
2020-03-22 19:37:04 -07:00
Benjamin Sergeant
5ce846f48b
indent files
2020-03-20 17:00:18 -07:00
Benjamin Sergeant
d6f534de06
(ws) ws echo_server gains a new option (-p) to disable responding to pings with pongs
2020-03-18 00:01:57 -07:00
Benjamin Sergeant
8ec515f292
(ws) ws connect gains a new option to set the interval at which to send pings
2020-03-17 23:54:32 -07:00
Benjamin Sergeant
e8f81776f9
(cobra to sentry bot + docker) default docker file uses mbedtls + ws cobra_to_sentry pass tls options to sentryClient.
2020-03-16 10:05:21 -07:00
Benjamin Sergeant
9801ebdb36
(cobra client) can subscribe with a position
2020-03-13 16:06:13 -07:00
Benjamin Sergeant
90df3d1805
(openssl tls backend) Fix a hand in OpenSSL when using TLS v1.3 ... by disabling TLS v1.3
2020-03-12 16:27:25 -07:00
Benjamin Sergeant
d4e1f71e3c
(cobra2sentry bot) take a sentry client as input instead of a dsn
2020-03-12 12:30:58 -07:00
Benjamin Sergeant
adf6aa1d6c
(cobra2sentry bot) remove the jobs option passed to ws, and only use one sentry sender
2020-03-12 12:24:25 -07:00
Benjamin Sergeant
cb1f9f5a44
clang formatting
2020-03-12 12:15:56 -07:00
Benjamin Sergeant
83ae105edb
minor refactoring to delete files which are not needed
2020-03-12 12:13:31 -07:00
Benjamin Sergeant
3df7c942d7
move sentry and statsd cobra ws commands into a new ixbots folder
2020-03-11 15:55:56 -07:00
Benjamin Sergeant
6a4d69afc5
(cobra) IXCobraConfig struct has tlsOptions and per message deflate options
2020-03-11 12:40:32 -07:00
Benjamin Sergeant
0a11132b07
(cobra) add IXCobraConfig struct to pass cobra config around
2020-03-11 10:48:41 -07:00
Benjamin Sergeant
b1f30bb40f
(ws cobra_subscribe) add a --fluentd option to wrap a message in an enveloppe so that fluentd can recognize it
2020-03-09 15:25:43 -07:00
Benjamin Sergeant
4c66a7561e
(WebSocketServer) add option to disable deflate compression, exposed with the -x option to ws echo_server
2020-02-18 21:38:28 -08:00
Benjamin Sergeant
45061b0b14
(http client + sentry minidump upload) Multipart stream closing boundary is invalid + mark some options as mandatory in the command line toolsj
2020-02-13 12:25:18 -08:00
Benjamin Sergeant
5f6c54bb90
(snake) add an option to disable answering pongs as response to pings, to test cobra client behavior with hanged connections
2020-01-31 16:55:54 -08:00
Benjamin Sergeant
aa12098cb5
add -6 option to ws echo_server / cf #148
2020-01-26 16:44:44 -08:00
Benjamin Sergeant
fad9f89846
(ws) add a dnslookup sub-command, to get the ip address of a remote host
2020-01-26 16:21:56 -08:00
Benjamin Sergeant
1320e4ddaf
Windows ws build fix
2020-01-07 17:37:38 -08:00
Benjamin Sergeant
f56098dd4c
(ws send) add option (-x) to disable per message deflate compression
2020-01-04 15:08:36 -08:00
Benjamin Sergeant
e0187b2d8e
fix typo in ws embedded help
2020-01-04 14:37:53 -08:00
Benjamin Sergeant
d60777b9cc
clang-format
2019-12-30 08:46:18 -08:00
Benjamin Sergeant
3a25a05d9c
(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
9dfcd8ea69
(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
9347664622
(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
a7977cf1a5
ws cobra subcommands / channel is not a positional argument anymore
2019-11-28 15:17:13 -08:00
Benjamin Sergeant
a0d5f37402
(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
5b282ce3b4
document new proxy command
2019-11-15 17:18:32 -08:00
Benjamin Sergeant
0e43c618a5
add stub code for ws proxy server
2019-11-15 14:30:20 -08:00
Benjamin Sergeant
6dabc68d29
remove unused quiet argument of ws cobra_metrics_to_redis command
2019-10-25 14:02:56 -07:00
Benjamin Sergeant
ac0593bfb3
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
c3a619f114
Add client support for websocket subprotocol. Look for the new addSubProtocol method for details
2019-10-13 13:37:34 -07:00
Benjamin Sergeant
41cbee2cd2
ws: Signal handling code isn't include on Windows
2019-10-01 16:12:32 -07:00
Benjamin Sergeant
a0cfaff528
Implement SSL server with OpenSSL backend / still flaky
2019-10-01 15:43:37 -07:00
Benjamin Sergeant
d6542383ed
Add --tls option to pass to ws server command, to enable/disable tls
2019-10-01 13:54:46 -07:00
Benjamin Sergeant
a1f3c40a2d
ws has a --version option
2019-09-30 17:31:33 -07:00
Benjamin Sergeant
864249b62d
most ws command take tls options, no-op for now (contributed by Matt DeBoer)
2019-09-29 18:29:51 -07:00
Benjamin Sergeant
8a662b35e1
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
ceb0c602c9
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
cd3c9d879c
reformat everything with clang-format
2019-09-23 10:25:23 -07:00
Benjamin Sergeant
47b3368f78
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
4e1dbbbecf
quiet mode
2019-09-01 10:45:51 -07:00
Benjamin Sergeant
b5b0de2083
+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
7a73ec7c06
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
d3e5a63fa2
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
5cc21c87fb
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
505e0c79d9
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
f84bc53c8d
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
9623ceb4d5
ws echo_server has a -g option to print a greeting message on connect
2019-06-08 09:16:33 -07:00
Benjamin Sergeant
076e8bf6a3
add an option to easily disable per message deflate compression
2019-06-06 13:48:53 -07:00
Benjamin Sergeant
396d0d9bdc
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
fcf5c41b43
add env var to display the ws command typed in
2019-05-10 16:27:23 -07:00
Benjamin Sergeant
dc1f9fb243
use spdlog for logging in ws + unittest + remove un-needed mutex
2019-05-09 15:30:44 -07:00
Benjamin Sergeant
7c30c8aa07
cout -> cerr
2019-05-09 15:06:42 -07:00
Benjamin Sergeant
232aa069d2
IXCobraMetricsThreadedPublisher.cpp uses a lambda to log instead of std::cerr
2019-05-08 18:53:32 -07:00
Benjamin Sergeant
d53c9c5ecf
change default ports for the ws command line tool
2019-05-08 13:56:42 -07:00
Benjamin Sergeant
9ee05bf591
ws connect mode / add a flag to disable automatic reconnection, not hooked up yet
2019-04-29 14:31:29 -07:00
Benjamin Sergeant
1c7c07e128
initialize netSystem (aka winsock on windows) explicitely
2019-04-25 16:38:15 -07:00
Benjamin Sergeant
0caf875399
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
5c85ee1214
add cobra metrics publisher
2019-04-21 11:16:33 -07:00
Benjamin Sergeant
d34f10b4ea
fix warning / ws_cobra_subscribe does not need a verbose flag
2019-04-19 11:45:42 -07:00
Benjamin Sergeant
8f8dd076ff
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
51fcf65424
(ws) add subcommands: cobra subscribe, and cobra subscribe to statsd bridge
2019-04-08 21:56:01 -07:00
Benjamin Sergeant
7767c96a9e
ws redis command improvements + test script
2019-03-27 13:41:46 -07:00
Benjamin Sergeant
3388bb50e1
(ws) redis_subscribe and redis_publish can take a password + display subscribe response
2019-03-26 09:33:22 -07:00
Benjamin Sergeant
0635313566
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
bbc0e2106c
workaround bug in Socket::isReadyToWrite
2019-03-18 20:37:33 -07:00
Benjamin Sergeant
d58798e36c
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
Benjamin Sergeant
b91dc77d6f
select interrupt cleanup
2019-03-14 18:37:38 -07:00
Benjamin Sergeant
5b4354a6f3
send optimization + ws file transfer test
2019-03-14 14:47:53 -07:00
Benjamin Sergeant
08c2cdbf1d
send can fail silently when sending would block (EWOULDBLOCK return for send) ( #18 )
...
* try to use a pipe for communication
* flush send buffer on the background thread
* cleanup
* linux fix / linux still use event fd for now
* cleanup
2019-03-13 23:09:45 -07:00
Benjamin Sergeant
d88bf16500
add new message type when receiving message fragments
2019-03-11 11:12:43 -07:00
Benjamin Sergeant
ad9c8318a7
ws broacast_server / can set serving hostname
2019-03-10 16:36:44 -07:00
Benjamin Sergeant
2c86fd947f
Feature/http ( #16 )
...
* add skeleton and broken http client code.
GET returns "Resource temporarily unavailable" errors...
* linux compile fix
* can GET some pages
* Update formatting in README.md
* unittest for sending large messages
* document bug
* Feature/send large message (#14 )
* introduce send fragment
* can pass a fin frame
* can send messages which are a perfect multiple of the chunk size
* set fin only for last fragment
* cleanup
* last fragment should be of type CONTINUATION
* Add simple send and receive programs
* speedups receiving + better way to wait for thing
* receive speedup by using linked list of chunks instead of large array
* document bug
* use chunks to receive data
* trailing spaces
* Update README.md
Add note about message fragmentation.
* Feature/ws cli (#15 )
* New command line tool for transfering files / still very beta.
* add readme
* use cli11 for argument parsing
* json -> msgpack
* stop using base64 and use binary which can be stored in message pack
* add target for building with homebrew
* all CMakeLists are referenced by the top level one
* add ws_chat and ws_connect sub commands to ws
* cleanup
* add echo and broadcast server as ws sub-commands
* add gitignore
* comments
* ping pong added to ws
* mv cobra_publisher under ws folder
* Update README.md
* linux build fix
* linux build fix
* move http_client to a ws sub-command
* simple HTTP post support (urlencode parameters)
* can specify extra headers
* chunk encoding / simple redirect support / -I option
* follow redirects is optional
* make README vim markdown plugin friendly
* cleanup argument parsing + add socket creation factory
* add missing file
* http gzip compression
* cleanup
* doc
* Feature/send large message (#14 )
* introduce send fragment
* can pass a fin frame
* can send messages which are a perfect multiple of the chunk size
* set fin only for last fragment
* cleanup
* last fragment should be of type CONTINUATION
* Add simple send and receive programs
* speedups receiving + better way to wait for thing
* receive speedup by using linked list of chunks instead of large array
* document bug
* use chunks to receive data
* trailing spaces
2019-02-28 21:54:03 -08:00
Benjamin Sergeant
98e7f5cb22
ping pong added to ws
2019-02-22 21:47:57 -08:00
Benjamin Sergeant
67e5957064
comments
2019-02-22 21:27:49 -08:00
Benjamin Sergeant
1c775cb759
add echo and broadcast server as ws sub-commands
2019-02-22 21:25:56 -08:00
Benjamin Sergeant
76e2f9f3ac
add ws_chat and ws_connect sub commands to ws
2019-02-22 20:49:26 -08:00
Benjamin Sergeant
2d696b6806
Feature/ws cli ( #15 )
...
* New command line tool for transfering files / still very beta.
* add readme
* use cli11 for argument parsing
* json -> msgpack
* stop using base64 and use binary which can be stored in message pack
2019-02-21 21:24:53 -08:00