Commit Graph
100 Commits
Author SHA1 Message Date
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
Benjamin Sergeant 8b95b173cd makefile tweak 2019-01-05 14:43:21 -08:00
Benjamin Sergeant 80a877ddab add dns lookup test 2019-01-05 14:40:17 -08:00
Benjamin Sergeant e892b21872 openssl cleanup 2019-01-05 11:42:25 -08:00
Benjamin SergeantandGitHub c344913ae8 Merge pull request #7 from bsergean/user/bsergeant/appveyor_first
unittest on appveyor
2019-01-04 17:29:23 -08:00
Benjamin Sergeant d34e47f716 windows fixes 2019-01-04 15:23:57 -08:00
Benjamin SergeantandGitHub 9bfba28d01 Merge pull request #6 from machinezone/user/bsergeant/server
Add support for writing websocket servers (IXWebSocketServer)
2019-01-03 18:47:30 -08:00
Benjamin Sergeant cc43357fb4 Socket::readLine works with arbitrary long lines 2019-01-03 18:47:01 -08:00
Benjamin Sergeant bce5ef2dca timeout is configurable 2019-01-03 18:33:08 -08:00
Benjamin Sergeant 3021ac4b95 remove useless FIXME comment 2019-01-03 18:02:03 -08:00
Benjamin Sergeant 385e80d185 new doc 2019-01-03 18:00:48 -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 6ac3bdb94a implement a max connections (default = 32) settings 2019-01-03 17:05:44 -08:00
Benjamin Sergeant e964a0a1f0 correct validation of the request (request line + headers) 2019-01-03 13:41:06 -08:00
Benjamin Sergeant 97255fbd62 cancellation refactoring 2019-01-03 12:53:44 -08:00
Benjamin Sergeant d5041f64be rename test file 2019-01-02 21:59:06 -08:00
Benjamin Sergeant 64f649d1f9 split handshake code into its own files, so that Transport file is less massive 2019-01-02 20:07:54 -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 c6adc00eac add new broadcast server example 2019-01-02 08:17:03 -08:00
Benjamin Sergeant b1710bfa31 server per message deflate support 2019-01-02 08:12:29 -08:00
Benjamin Sergeant 0e52c42970 echo server example is a real echo server, not a broadcast server 2019-01-02 08:10:39 -08:00
Benjamin Sergeant 2b136b2981 refactoring + cancellation was buggy during http upgrade 2019-01-02 07:45:07 -08:00
Benjamin Sergeant b95e5e36dc use select to detect new incoming connections 2019-01-01 22:21:07 -08:00
Benjamin Sergeant 1bc5bc7f1c add a way to run in blocking more, which is useful for server mode to have N*thread instead of 2N*thread for N connections 2019-01-01 21:25:15 -08:00