Commit Graph

54 Commits

Author SHA1 Message Date
Benjamin Sergeant
f6bf2531bb Add ability to use OpenSSL on apple platforms. 2019-09-29 15:34:58 -07:00
Benjamin Sergeant
94c589f696 Fix 2 race conditions detected with TSan, one in CobraMetricsPublisher::push and another one in WebSocketTransport::sendData (that one was bad). 2019-09-24 11:46:54 -07:00
Benjamin Sergeant
1cde26771a move snake code to its own subfolder like ixcobra, ixcrypto, etc... 2019-09-23 11:46:16 -07:00
Benjamin Sergeant
1c08cedd8a make test target does not try to install anything into /usr/local 2019-09-12 11:45:31 -07:00
Benjamin Sergeant
e2121d809e fix unittest warnings + remove trailing spaces 2019-09-12 11:43:52 -07:00
Benjamin Sergeant
2453f5b717 restructure project 2019-09-10 12:19:22 -07:00
Benjamin Sergeant
a43046c921 ws autobahn / report progress with spdlog::info to get timing info 2019-09-04 10:16:32 -07:00
Benjamin Sergeant
94c8966e86 Close connections when reserved bits are used (autobahn test: 3 Reserved Bits) 2019-09-01 16:23:00 -07:00
Benjamin Sergeant
96380dd462 doc 2019-09-01 11:28:27 -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
53c767140d add new makefile target to make git tags 2019-08-20 09:21:30 -07:00
Benjamin Sergeant
747746cba1 dns / use cancellable instead of blocking 2019-06-30 23:26:14 -07:00
Benjamin Sergeant
b26e9d0338 IXDNSLookup. Uses weak pointer + smart_ptr + shared_from_this instead of static sets + mutex to handle object going away before dns lookup has resolved 2019-06-19 00:43:59 -07:00
Benjamin Sergeant
3a1918eb2f Add -DUSE_VENDORED_THIRD_PARTY=1 to build ws 2019-06-10 13:26:41 -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
539abe5151 HttpResponse is a struct, not a tuple 🉐 2019-06-03 22:12:52 -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
06cbebe22e Feature/mbedtls (#84)
* try to import mbedtls and build it

* add stubs socket class

* some boilterplate, read and write function implemented

* more boilterplate / current error in handshake because no CA cert is setup

* add something so skip ca verification, can ws curl https://google.com !

* cleanup / close implemented

* tweak CMakefiles

* typo in include

* update readme

* disable unittests
2019-06-01 17:41:48 -07:00
Benjamin Sergeant
285386e47f fix cobra to sentry + change ws docker file to use alpine (much smaller footprint) 2019-05-31 00:43:22 -07:00
Benjamin Sergeant
c65fec7271 clang format, based on cpprest 2019-05-30 08:46:50 -07:00
Benjamin Sergeant
e5edbeacb4 travis makefile fix 2019-05-16 14:02:24 -07:00
Benjamin Sergeant
964fb20df9 try to run ws test on linux + macOS on travis 2019-05-16 13:57:33 -07:00
Benjamin Sergeant
3a55c7aaba build ws on travis (mac + linux) 2019-05-16 07:01:15 -07:00
Benjamin Sergeant
e0d9a16985 more protection against socket when closing 2019-05-15 15:18:46 -07:00
Benjamin Sergeant
b8087f6c48 Fix #38 Add some docker doc in the README 2019-04-23 20:51:58 -07:00
Benjamin Sergeant
b6b9ffd15c doc cobra 2019-04-21 11:52:38 -07:00
Benjamin Sergeant
1189b5f693 new target to uninstall files 2019-04-21 11:47:57 -07:00
Benjamin Sergeant
1c2b6d59da Fix #37 / add directives to install headers and library 2019-04-21 11:42:37 -07:00
Benjamin Sergeant
b74bccee0a fix test execution on travis which was broken / unify running test locally and on travis 2019-04-19 09:46:17 -07:00
Benjamin Sergeant
65b11cb968 docker container works with SSL + fix compiler warnings in statsd third_party module 2019-04-18 09:11:12 -07:00
Benjamin Sergeant
fe38dab405 better unittest runner / can run through lldb and produce a junit XML artifact 2019-03-29 15:54:05 -07:00
Benjamin Sergeant
7767c96a9e ws redis command improvements + test script 2019-03-27 13:41:46 -07:00
Benjamin Sergeant
523a6e989a make PollResultType an enum class 2019-03-19 09:29:57 -07:00
Benjamin Sergeant
705e9a93f8 add an install target 2019-03-18 15:11:08 -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
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
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
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
6b8694bfbf add target for building with homebrew 2019-02-21 22:05:30 -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
Benjamin Sergeant
932bb732e0 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-20 18:59:07 -08:00
Benjamin Sergeant
726e66ca66 unittest for sending large messages 2019-02-16 10:32:02 -08:00
Benjamin Sergeant
885d245afb heartbeat correct 2019-01-25 16:11:39 -08:00
Benjamin Sergeant
8b95b173cd makefile tweak 2019-01-05 14:43:21 -08:00
Benjamin Sergeant
3eef8fba27 unittest on appveyor 2019-01-04 17:28:13 -08:00
Benjamin Sergeant
bd1c8873d0 capture path/uri when connecting, and pass it back through callbacks in the openInfo member 2019-01-03 17:44:10 -08:00
Benjamin Sergeant
097c7e5397 server unittest for validating client request / new timeout cancellation handling (need refactoring) 2019-01-02 16:08:32 -08:00
Benjamin Sergeant
973a3f03c3 linux fix + unittest works with Linux 2019-01-01 17:13:26 -08:00