Commit Graph
100 Commits
Author SHA1 Message Date
Benjamin Sergeant 662f66e501 (socket server) wait for all connections threads to be terminated before exiting stop method 2019-04-19 16:31:33 -07:00
Benjamin Sergeant 9131cb4790 default sanitizer choice 2019-04-19 15:13:59 -07:00
Benjamin Sergeant 3b616676c6 disable clang sanitizers in CI on any platforms but Darwin 2019-04-19 15:09:01 -07:00
Benjamin Sergeant cce759b8dd fix Linux cast warning 2019-04-19 15:03:49 -07:00
Benjamin Sergeant 98b6c9b89e (unittest) upgrade to Catch2 version 2.7.1 2019-04-19 14:41:03 -07:00
Benjamin Sergeant 5370201df8 add locks around Socket::send and Socket::recv to see if it helps with thread sanitizer error in Linux CI 2019-04-19 14:28:51 -07:00
Benjamin Sergeant 419c395966 uses sh syntax to capture output 2019-04-19 12:40:39 -07:00
Benjamin Sergeant 2962ce9a0f (ci) verbose mode to figure out Linux build problems on travis 2019-04-19 12:10:43 -07:00
Benjamin Sergeant c96398aa0c Windows nmake does not have a -j flag 2019-04-19 11:58:02 -07:00
Benjamin Sergeant e68ce1d680 Windows + unittest python script fixes 2019-04-19 11:54:58 -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 7e2c1f274b (test) build dir is an absolute path 2019-04-19 11:45:02 -07:00
Benjamin Sergeant 9fe3811c45 (ws) fix compiler warnings 2019-04-19 09:48:46 -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 a2d170f415 fix bad merge in IXWebSocketTransport.cpp ... 2019-04-19 09:41:16 -07:00
Benjamin Sergeant 03f762db86 Socket::Poll does not need a callback 2019-04-19 09:32:49 -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 f4f60d38b8 docker + linux build fix 2019-04-17 22:52:03 -07:00
Benjamin Sergeant 4337345103 setter method does not need to return anything, make it void 2019-04-17 20:36:26 -07:00
Benjamin Sergeant 52f460f66d (doc) Add more doc to SocketServer 2019-04-17 20:36:26 -07:00
Benjamin Sergeant d486c72e02 websocket server: closed connection threads are joined properly 2019-04-17 20:36:26 -07:00
Benjamin SergeantandGitHub bdfc55b951 Bug/30 server connection problem (#31)
* use threads instead of std::async, need to cleanup threads

* less buggy server connection per thread system
2019-04-16 22:19:44 -07:00
Benjamin Sergeant b0f6026c23 make closeWireSize a default parameter of WebSocketTransport::close 2019-04-16 09:55:12 -07:00
Benjamin SergeantandGitHub eac611ab1e Feature/connection state (#25)
* (cmake) add a warning about 32/64 conversion problems.

* fix typo

* New connection state for server code + fix OpenSSL double init bug

* update README
2019-03-20 18:34:24 -07:00
Benjamin SergeantandGitHub 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 SergeantandGitHub 34de36fe01 Update README.md
Stop lying about Windows support ...
2019-03-13 23:10:40 -07:00
Benjamin SergeantandGitHub 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 SergeantandGitHub 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 SergeantandGitHub 927484a71f Update README.md 2019-02-22 21:53:29 -08:00
Benjamin Sergeant 88adb8f5ef mv cobra_publisher under ws folder 2019-02-22 21:51: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 8c3473a91a add gitignore 2019-02-22 21:26:25 -08:00
Benjamin Sergeant 1c775cb759 add echo and broadcast server as ws sub-commands 2019-02-22 21:25:56 -08:00
Benjamin Sergeant c4054d4984 cleanup 2019-02-22 20:51:22 -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 41a40b8b9f all CMakeLists are referenced by the top level one 2019-02-21 22:21:29 -08:00
Benjamin Sergeant 6b8694bfbf add target for building with homebrew 2019-02-21 22:05:30 -08:00
Benjamin SergeantandGitHub 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 SergeantandGitHub 709a5ec89a Update README.md
Add note about message fragmentation.
2019-02-21 14:08:27 -08:00
Benjamin SergeantandGitHub 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 dd4e29542c document bug 2019-02-16 10:33:37 -08:00
Benjamin Sergeant 726e66ca66 unittest for sending large messages 2019-02-16 10:32:02 -08:00
Benjamin SergeantandGitHub 474fd70ec7 Update formatting in README.md 2019-02-05 23:04:45 -08:00
Benjamin Sergeant 5074dbc3c6 more conf in CI 2019-01-29 17:50:19 -08:00
Benjamin Sergeant eb54e7f1ae get free port that can be used by non root users (> 1024) 2019-01-28 15:24:19 -08:00
Benjamin Sergeant 8983dd97a1 use dynamically generated port number to configure servers in unittest 2019-01-28 15:24:19 -08:00
Benjamin SergeantandGitHub 7eaea28970 Merge pull request #13 from machinezone/user/bsergeant/poll
User/bsergeant/poll
2019-01-27 10:47:38 -08:00
Benjamin Sergeant 907605c59c windows build fix 2019-01-27 10:46:02 -08:00
Benjamin Sergeant 58921592c8 constexpr to declare number of fds 2019-01-26 21:01:36 -08:00
Benjamin Sergeant b9c49c38ed linux fix 2019-01-26 20:57:48 -08:00
Benjamin Sergeant 76c97027c8 remove shutdown call 2019-01-26 20:54:23 -08:00
Benjamin Sergeant 5db3620f49 rebase poll branch 2019-01-26 20:50:25 -08:00
Benjamin Sergeant a2e6fa0b16 insensitive string compare when validating server connection header 2019-01-25 16:17:51 -08:00
Benjamin SergeantandGitHub 1d359f0fc4 Merge pull request #12 from machinezone/user/bsergeant/heart-beat
Add an optional heartbeat
2019-01-25 16:14:28 -08:00
Benjamin Sergeant 885d245afb heartbeat correct 2019-01-25 16:11:39 -08:00
Benjamin Sergeant 75d01c0c11 close server socket on exit 2019-01-24 21:16:32 -08:00
Benjamin Sergeant ea219e3ddd unittest fix 2019-01-24 19:54:10 -08:00
Benjamin Sergeant e9cd54b2f4 add an heartbeat test 2019-01-24 18:50:07 -08:00
Benjamin Sergeant a8b6573f96 hearbeat 2019-01-24 12:42:49 -08:00
Benjamin SergeantandGitHub 4e158c8ba7 Update README.md 2019-01-15 09:36:43 -08:00
Benjamin Sergeant 121c84a2d1 check and validate the Connection: Upgrade header in client/server 2019-01-15 09:31:37 -08:00
Benjamin SergeantandGitHub bfb76de9ab Merge pull request #10 from tonylin0826/master
Fix missing "Upgrade" header error
2019-01-15 09:22:11 -08:00
Benjamin Sergeant a0f15bfb56 C++14 + use make_unique and make_shared to make shared pointers 2019-01-11 21:25:06 -08:00
Benjamin Sergeant 7fabd14a63 add travis badge 2019-01-08 10:13:23 -08:00
Benjamin Sergeant 6b4d2aeb07 travis -> osx 2019-01-08 10:04:47 -08:00
Benjamin Sergeant 5ab61b46b5 Revert "Revert "try asan on Linux"" [Back to asan on Linux]
This reverts commit 02a704a8c7.
2019-01-07 21:13:48 -08:00
Benjamin Sergeant 39c9691d70 travis-ci: try to use clang on Linux 2019-01-07 20:49:03 -08:00
Benjamin Sergeant d00960b33f Revert "try asan on Linux"
This reverts commit dd2360ed70.
2019-01-07 20:47:25 -08:00
Benjamin Sergeant 4a5cfac2ea try asan on Linux 2019-01-07 18:29:44 -08:00
Benjamin Sergeant 7e1d21239f build with osx on travis 2019-01-07 18:16:29 -08:00
Benjamin Sergeant 1a8b870a9e fix simple compile error in test/IXTest.h 2019-01-07 18:08:11 -08:00
Benjamin Sergeant 3e150db493 add a travis file for real 2019-01-07 18:05:55 -08:00
Benjamin Sergeant 1cf8b7e952 add a travis file 2019-01-07 18:04:28 -08:00
Benjamin Sergeant ea75432f12 update test remote ws url 2019-01-07 11:28:53 -08:00
Benjamin Sergeant 85370dfd21 remove cmake sanitizer submodule 2019-01-07 11:26:23 -08:00
Benjamin Sergeant 8a0afef825 check select errors better 2019-01-07 11:18:00 -08:00
Benjamin Sergeant 76f196206b sanitizer cmake stuff 2019-01-06 18:54:16 -08:00
Benjamin Sergeant bf3e8195f7 DNSLookup _id member does not need to be an atomic 2019-01-06 18:32:19 -08:00
Benjamin Sergeant bce3071a12 DNSLookup: fix #8 2019-01-06 18:27:26 -08:00
Benjamin Sergeant 911f684e4d DNSLookup: copy hostname and port instead of accessing member 2019-01-06 18:17:12 -08:00
Benjamin Sergeant 49bc156a56 return false -> return -1 2019-01-06 18:10:39 -08:00
Benjamin Sergeant 791c3701d7 add new unittest 2019-01-06 15:14:13 -08:00
Benjamin Sergeant 372af54e46 remove dead file 2019-01-06 14:26:11 -08:00
Benjamin Sergeant 20c8953e5b remove openssl testing bits for apple build 2019-01-06 14:21:49 -08:00
Benjamin Sergeant 2f9ad54bae gcc linux compile fix 2019-01-06 12:12:39 -08:00
Benjamin Sergeant 57c22cddb8 make a class hierarchy for server code (IXWebSocketServer <- IXSocketServer) 2019-01-06 12:09:31 -08:00
Benjamin Sergeant a5026849a3 add log 2019-01-05 21:16:13 -08:00
Benjamin Sergeant 60dc765178 unittest + compiler warnings 2019-01-05 21:10:08 -08:00
Benjamin Sergeant 5e1c150024 windows compile fix 2019-01-05 21:02:55 -08:00
Benjamin Sergeant 0fd06bb592 int -> ssize_t for socker recv and send 2019-01-05 20:53:50 -08:00
Benjamin Sergeant 9641c8cf49 header refactoring 2019-01-05 20:38:43 -08:00
Benjamin Sergeant 4ca31be4a2 windows connect (compile fix) 2019-01-05 17:35:50 -08:00
Benjamin Sergeant 667f18cbfe windows connect potential fix 2019-01-05 17:32:21 -08:00
Benjamin Sergeant 4df5050760 more accurate description of errors 2019-01-05 17:18:43 -08:00
Benjamin Sergeant f50881a72f SocketTest / more debug info 2019-01-05 17:10:01 -08:00
Benjamin Sergeant b80696af00 windows (compile) fix 2019-01-05 17:04:09 -08:00
Benjamin Sergeant 3cb2f6dcf7 windows fix 2019-01-05 17:02:39 -08:00
Benjamin Sergeant b1e2c4ce72 test failure is not noticed 2019-01-05 16:30:22 -08:00
Benjamin Sergeant 89ff9dd5ac fix gcc warning 2019-01-05 16:26:11 -08:00