Benjamin Sergeant
2e4c4b72b6
update appveyor windows build file
2019-05-06 17:50:55 -07:00
Benjamin Sergeant
205c8c15bd
socket server / used wrong mutex to protect _connectionsThreads
2019-05-06 12:24:20 -07:00
Benjamin Sergeant and GitHub
d561e1141e
Update README.md
2019-05-06 09:22:52 -07:00
Benjamin Sergeant
5dbc00bbfe
doc: add reference to the conan file built at https://github.com/Zinnion/conan-IXWebSocket
2019-05-01 21:31:32 -07:00
Benjamin Sergeant
14ec8522ef
remove un-needed _backgroundThreadRunning variable
2019-05-01 11:09:25 -07:00
Benjamin Sergeant and GitHub
0c2d1c22bc
Make AutomaticReconnection optional ( #47 )
...
* unittest pass + commands behave as expected
* cleanup
2019-04-29 21:12:34 -07:00
Benjamin Sergeant
1d39a9c9a9
build fix
2019-04-29 20:54:00 -07:00
Benjamin Sergeant
b588ed0fa1
tsan fixes on ubuntu xenial (what travis run)
2019-04-29 20:48:16 -07:00
Benjamin Sergeant
d9f7a138b8
dns lookup: fix race condition accessing _errMsg
2019-04-29 19:29:27 -07:00
Benjamin Sergeant
d3e04ff619
tsan linux tentative fix / copy string instead of passing a const reference
2019-04-29 17:27:53 -07:00
Benjamin Sergeant
372dd24cc7
rename _blocking to _backgroundThreadRunning and invert the naming
2019-04-29 16:54:08 -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
8e4cf74974
enable tsan on travis for all configs
2019-04-29 09:11:16 -07:00
Benjamin Sergeant
0a7157655b
initialize netSystem (aka winsock on windows) explicitely
2019-04-25 16:38:15 -07:00
Benjamin Sergeant
b178ba16af
fix indentation of greatestCommonDivisor
2019-04-25 16:21:36 -07:00
Benjamin Sergeant
e4c09284b5
Remove commented code
2019-04-25 16:16:52 -07:00
Benjamin Sergeant
9367a1feff
Fix data race in WebSocket where _url is accessed without protection in setThreadName
...
Also fix with url usage + docker container uses fedora and works with tsan
2019-04-25 16:11:46 -07:00
Benjamin Sergeant
d37ed300e2
disable failing unittest temporarily
2019-04-25 09:04:35 -07:00
Benjamin Sergeant
d036ad7138
tsan fix for the IXWebSocketServerTest test, where there's a data race for connectionId
2019-04-24 22:11:14 -07:00
Benjamin Sergeant
4fe07579b9
Fix data races in DNSLookup (tsan)
2019-04-24 21:53:31 -07:00
Benjamin Sergeant
f563d14134
better server termination / another try at preventing thread join failures
2019-04-24 09:45:53 -07:00
Benjamin Sergeant
f1b3ecc738
compiler warning police
2019-04-24 09:45:03 -07:00
Benjamin Sergeant
8387f89115
Fix #38 Add some docker doc in the README
2019-04-23 20:51:58 -07:00
Benjamin Sergeant
773f92347f
ws cobra publish stress mode fix
2019-04-23 20:51:58 -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
9ab7bc652a
(server) attempt to fix broken macOS unittest on travis CI
2019-04-22 09:36:16 -07:00
Benjamin Sergeant
e5c724eb05
Expand build section in the main README
2019-04-21 21:11:08 -07:00
Benjamin Sergeant
e0300903d9
Merge branch 'dhruvkakadiya-readme/fix'
2019-04-21 16:14:35 -07:00
Benjamin Sergeant
210d19c8a0
doc cobra
2019-04-21 11:52:38 -07:00
Benjamin Sergeant
6d24cc44b2
new target to uninstall files
2019-04-21 11:47:57 -07:00
Benjamin Sergeant
768e8eb074
Fix #37 / add directives to install headers and library
2019-04-21 11:42:37 -07:00
Benjamin Sergeant
3dd902e1f9
move cobra files to their own subfolder
2019-04-21 11:20:17 -07:00
Benjamin Sergeant
f85c5002b7
add cobra metrics publisher
2019-04-21 11:16:33 -07:00
Benjamin Sergeant
d48bf9249b
indentation / comestic changes
2019-04-19 16:57:38 -07:00
Benjamin Sergeant
0dfc66f1c7
(test) / use a random number generator to get a free port, when the bind to port 0 strategy does not work out
2019-04-19 16:50:04 -07:00
Benjamin Sergeant
4564173b75
(socket server) wait for all connections threads to be terminated before exiting stop method
2019-04-19 16:31:33 -07:00
Benjamin Sergeant
b60e5aaf1f
default sanitizer choice
2019-04-19 15:13:59 -07:00
Benjamin Sergeant
da67f4cb9a
disable clang sanitizers in CI on any platforms but Darwin
2019-04-19 15:09:01 -07:00
Benjamin Sergeant
b041042473
fix Linux cast warning
2019-04-19 15:03:49 -07:00
Benjamin Sergeant
f83263d6a1
(unittest) upgrade to Catch2 version 2.7.1
2019-04-19 14:41:03 -07:00
Benjamin Sergeant
b0139c2217
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
0ba2e2ce96
uses sh syntax to capture output
2019-04-19 12:40:39 -07:00
Benjamin Sergeant
4a91ad80c8
(ci) verbose mode to figure out Linux build problems on travis
2019-04-19 12:10:43 -07:00
Benjamin Sergeant
4cc715b13d
Windows nmake does not have a -j flag
2019-04-19 11:58:02 -07:00
Benjamin Sergeant
0dfd7cd543
Windows + unittest python script fixes
2019-04-19 11:54:58 -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
65db8c9b00
(test) build dir is an absolute path
2019-04-19 11:45:02 -07:00
Benjamin Sergeant
4c4137d9f2
(ws) fix compiler warnings
2019-04-19 09:48:46 -07:00
Benjamin Sergeant
e433e8b5e9
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
bb442021cf
fix bad merge in IXWebSocketTransport.cpp ...
2019-04-19 09:41:16 -07:00
Benjamin Sergeant
91106b7456
Socket::Poll does not need a callback
2019-04-19 09:32:49 -07:00
Benjamin Sergeant
f0375e59fa
docker container works with SSL + fix compiler warnings in statsd third_party module
2019-04-18 09:11:12 -07:00
Benjamin Sergeant
c367435073
docker + linux build fix
2019-04-17 22:52:03 -07:00
Benjamin Sergeant
dc812c384e
setter method does not need to return anything, make it void
2019-04-17 20:36:26 -07:00
Benjamin Sergeant
10b2d10dbd
(doc) Add more doc to SocketServer
2019-04-17 20:36:26 -07:00
Benjamin Sergeant
f96babc6a6
websocket server: closed connection threads are joined properly
2019-04-17 20:36:26 -07:00
Benjamin Sergeant and GitHub
4e2e14fb22
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
bcf2fc1812
make closeWireSize a default parameter of WebSocketTransport::close
2019-04-16 09:55:12 -07:00
Benjamin Sergeant and GitHub
ee25bd0f92
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 Sergeant and GitHub
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 and GitHub
168918f807
Update README.md
...
Stop lying about Windows support ...
2019-03-13 23:10:40 -07:00
Benjamin Sergeant and GitHub
2750df8aa7
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 and GitHub
0cff5065d9
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 and GitHub
e881b82511
Update README.md
2019-02-22 21:53:29 -08:00
Benjamin Sergeant
d5551e5d68
mv cobra_publisher under ws folder
2019-02-22 21:51:03 -08:00
Benjamin Sergeant
e8583000b8
ping pong added to ws
2019-02-22 21:47:57 -08:00
Benjamin Sergeant
d642ef1a89
comments
2019-02-22 21:27:49 -08:00
Benjamin Sergeant
2df118022d
add gitignore
2019-02-22 21:26:25 -08:00
Benjamin Sergeant
95457c8f4c
add echo and broadcast server as ws sub-commands
2019-02-22 21:25:56 -08:00
Benjamin Sergeant
0a45b7787f
cleanup
2019-02-22 20:51:22 -08:00
Benjamin Sergeant
b8c397e180
add ws_chat and ws_connect sub commands to ws
2019-02-22 20:49:26 -08:00
Benjamin Sergeant
90105fa2b3
all CMakeLists are referenced by the top level one
2019-02-21 22:21:29 -08:00
Benjamin Sergeant
24859fef8a
add target for building with homebrew
2019-02-21 22:05:30 -08:00
Benjamin Sergeant and GitHub
73d7280723
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 and GitHub
262de49c3c
Update README.md
...
Add note about message fragmentation.
2019-02-21 14:08:27 -08:00
Benjamin Sergeant and GitHub
3a77e96a05
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
505dd6d50f
document bug
2019-02-16 10:33:37 -08:00
Benjamin Sergeant
3f8027b65c
unittest for sending large messages
2019-02-16 10:32:02 -08:00
Benjamin Sergeant and GitHub
0f2c765f45
Update formatting in README.md
2019-02-05 23:04:45 -08:00
Benjamin Sergeant
49077f8f44
more conf in CI
2019-01-29 17:50:19 -08:00
Benjamin Sergeant
6a23b8530f
get free port that can be used by non root users (> 1024)
2019-01-28 15:24:19 -08:00
Benjamin Sergeant
ae841af91a
use dynamically generated port number to configure servers in unittest
2019-01-28 15:24:19 -08:00
Benjamin Sergeant and GitHub
44f38849b2
Merge pull request #13 from machinezone/user/bsergeant/poll
...
User/bsergeant/poll
2019-01-27 10:47:38 -08:00
Benjamin Sergeant
ee12fbdb5f
windows build fix
2019-01-27 10:46:02 -08:00
Benjamin Sergeant
316c630830
constexpr to declare number of fds
2019-01-26 21:01:36 -08:00
Benjamin Sergeant
1ea5db6110
linux fix
2019-01-26 20:57:48 -08:00
Benjamin Sergeant
986d9a00c0
remove shutdown call
2019-01-26 20:54:23 -08:00
Benjamin Sergeant
7a05a11014
rebase poll branch
2019-01-26 20:50:25 -08:00
Benjamin Sergeant
f09434263c
insensitive string compare when validating server connection header
2019-01-25 16:17:51 -08:00
Benjamin Sergeant and GitHub
335f594165
Merge pull request #12 from machinezone/user/bsergeant/heart-beat
...
Add an optional heartbeat
2019-01-25 16:14:28 -08:00
Benjamin Sergeant
fa7ef06f4d
heartbeat correct
2019-01-25 16:11:39 -08:00
Benjamin Sergeant
3c9ec0aed0
close server socket on exit
2019-01-24 21:16:32 -08:00
Benjamin Sergeant
c665d65cba
unittest fix
2019-01-24 19:54:10 -08:00
Benjamin Sergeant
5d4e897cc4
add an heartbeat test
2019-01-24 18:50:07 -08:00
Benjamin Sergeant
05033714bf
hearbeat
2019-01-24 12:42:49 -08:00
Benjamin Sergeant and GitHub
a02bd3f25c
Update README.md
2019-01-15 09:36:43 -08:00
Benjamin Sergeant
fdbd213fa2
check and validate the Connection: Upgrade header in client/server
2019-01-15 09:31:37 -08:00
Benjamin Sergeant and GitHub
da64d349c8
Merge pull request #10 from tonylin0826/master
...
Fix missing "Upgrade" header error
2019-01-15 09:22:11 -08:00
Benjamin Sergeant
79dd766fab
C++14 + use make_unique and make_shared to make shared pointers
2019-01-11 21:25:06 -08:00
Benjamin Sergeant
8375b28747
add travis badge
2019-01-08 10:13:23 -08:00