43 Commits

Author SHA1 Message Date
Dmitriy Ryajov
903e79ede1
Feat/conn cleanup (#41)
Backporting proper connection cleanup from #36 to align with latest chronos changes.

* add close event

* use proper varint encoding

* add proper channel cleanup in mplex

* add connection cleanup in secio

* tidy up

* add dollar operator

* fix tests

* don't close connections prematurely

* handle closing streams properly

* misc

* implement address filtering logic

* adding pipe tests

* don't use gcsafe if not needed

* misc

* proper connection cleanup and stream muxing

* re-enable pubsub tests
2019-12-03 22:44:54 -06:00
Dmitriy Ryajov
1df16bdbce set log level to trace - not enabled by default 2019-12-02 18:43:21 -06:00
Dmitriy Ryajov
fe3c1d45bb misc: removing unneded accessors 2019-11-06 12:13:21 -06:00
Dmitriy Ryajov
3194e3ac5b fixes after building with 0.20.2 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
f9a04dbb9d todo: poll should allow for timeouts 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
cfd31c5251 properly handle empty messages 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
f8872dd51c make log topics consistent 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
c7606ce2eb readMsg should never return an empty buffer 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
f7e5c8ee30 bring back commented tests 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
bc46a76029 connection should raise on invalid varint 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
f5508be544 yield to chronos in mplex loop 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
5ae37cac98 no more buffer resets on len prefixed reads 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
99869aa8b8 don't reset buffer on exception 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
9862064234 changed copyright year 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
5b3f93ba1c feat: allow multiple handlers per topic in pubsub 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
2f31fc6940 misc: TODO for timeouts and message limit in mplex 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
054085620c logging: switch debug for trace in most cases 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
9bb892de69 wip: integrating and testing secio 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
ef89e98479 renaming channel 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
88079a2864 incomming connection handling flow and tests 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
8920cd7d60 misc: pubsub/floodsub and logging 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
5f2d944545 add muxer handler and properly set stream peerinfo 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
67e10d0747 set mplex channel peerInfo correctly 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
74d2aea63d adding chronicles topics 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
2febd47e0d don't complete futures twise 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
435c69633f adding chronicles logging 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
93a9fd203a fix: multistream tests 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
701e048ee6 add debug logging 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
b5dcfa9bc4 first attempt to proper channel cleanup 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
65ce1a93fc prevent interleaved channel data 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
8c76799d9e make writes sequential 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
e53c87e197 reworked to make msg reading sequential 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
e5b782f094 mplex testing/interop 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
8338a16aab testing mplex 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
2f402d68e1 docs/wording 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
0b784c5b58 don't pass stream handler through contructor 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
ec351cc2b0 misc: cleanup mplex 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
6ce2782e5c add missing test 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
9b485b3082 feat: half closed channels 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
6058a3fc69 split mplex 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
1b02c5e4e4 don't block main loop 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
a0aaa29739 wip: mplex and mplex tests 2019-10-11 08:15:24 +09:00
Dmitriy Ryajov
96cd7bcf50 wip: mplex tests 2019-10-11 08:15:24 +09:00