Commit Graph

27 Commits

Author SHA1 Message Date
dimon4eg
2727d39fa4 update comments 2019-05-09 00:16:37 +03:00
Dimon4eg
45d40dc159 Added IXWebSocketPoll class 2019-05-08 22:02:56 +03:00
Benjamin Sergeant
b5aae88a0b remove un-needed _backgroundThreadRunning variable 2019-05-01 11:09:25 -07:00
Benjamin Sergeant
e3444e666b rename _blocking to _backgroundThreadRunning and invert the naming 2019-04-29 16:54:08 -07:00
Alexandre Konieczny
e37e69311b fix data race on _thread 2019-04-29 16:46:16 -07:00
Kumamon38
28210ee31d add boolean and add missing protocol error close constant (#41) 2019-04-23 04:31:55 -07:00
Benjamin Sergeant
7df7453365 indentation / comestic changes 2019-04-19 16:57:38 -07:00
Kumamon38
c3431f19bf Real ping (#32)
* close method change and fix code

* missing mutex

* wip

* renaming and fixes

* renaming, fixes

* added enablePong/disablePong, add tests

* added new test cases

* add 1 test case

* fix gcd name to greatestCommonDivisor

* move ping and ping timeout checks into socket poll, local var in test cases and indent fixes

* indent issue
2019-04-18 09:24:16 -07:00
Benjamin Sergeant
f029321664 can send TEXT message (we only support BINARY messages now) 2019-03-22 14:24:22 -07:00
Michael Lu
663299c91e Fixed heartbeat typos (#22) 2019-03-19 21:31:43 -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
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
a8b6573f96 hearbeat 2019-01-24 12:42:49 -08:00
Benjamin Sergeant
0fd06bb592 int -> ssize_t for socker recv and send 2019-01-05 20:53:50 -08:00
Benjamin Sergeant
bce5ef2dca timeout is configurable 2019-01-03 18:33:08 -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
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
Benjamin Sergeant
3443e82812 more cleanup to propagate server connection error and let onOpen callback execute 2018-12-31 12:43:47 -08:00
Benjamin Sergeant
379a845166 cleanup / use a websocket instead of raw websockettransport 2018-12-30 22:00:49 -08:00
Benjamin Sergeant
49bf8bd830 threading race condition fixes, detected by TSAN 2018-12-06 08:27:28 -08:00
Benjamin Sergeant
c64bc20bb5 cleanup 2018-11-14 15:52:28 -08:00
Benjamin Sergeant
4fed156b90 per message deflate support (with zlib) 2018-11-09 18:42:09 -08:00
Benjamin Sergeant
a8dfd640a7 capture an error code and a reason when the server closes the connection 2018-10-25 18:51:19 -07:00
Benjamin Sergeant
eae2f7d113 Better ping/pong support 2018-10-25 14:43:35 -07:00
Benjamin Sergeant
376c8c2e00 Update IXWebSocket.h
Remove dead code
2018-10-07 15:49:07 -07:00
Benjamin Sergeant
9b8d6cedfe First import 2018-09-27 14:57:19 -07:00