Commit Graph

27 Commits

Author SHA1 Message Date
Derrick Hammer eb4a8f1c9e
Revert "*Change pullRemote to throw if the item is not empty"
This reverts commit 74b0f1d596.
2023-04-06 16:21:30 -04:00
Derrick Hammer 74b0f1d596
*Change pullRemote to throw if the item is not empty 2023-04-06 16:20:20 -04:00
Derrick Hammer bef4631c30
*Switch sync approach. sync state properties ondemand before and after accessing them 2023-04-06 15:58:39 -04:00
Derrick Hammer f457294772
*Add concept of being a slave
*on _onopensession, if we are a slave, sync before checking _remote
2023-04-06 14:21:01 -04:00
Derrick Hammer 81eac54453
Revert "Revert "*make syncing async""
This reverts commit d37d37048c.
2023-04-06 14:15:39 -04:00
Derrick Hammer d37d37048c
Revert "*make syncing async"
This reverts commit 5907966d
2023-04-06 13:26:20 -04:00
Derrick Hammer d7dede7894
*need to use _mux on Channel calls to syncState 2023-04-05 20:03:12 -04:00
Derrick Hammer 5907966d77
*make syncing async 2023-04-05 17:46:07 -04:00
Derrick Hammer 6cb9fd8283
*add calls to this.syncState?.() which may be dynamically set higher in the stack to sync the state of the channels and messages 2023-04-05 03:45:10 -04:00
Derrick Hammer bbe30a3de5
*prettier 2023-04-05 03:36:37 -04:00
Mathias Buus 78e83bbfa9 failing test 2023-01-13 14:08:34 +01:00
Ar Nazeh 43d5192f31
Deduplicate muxer for a given same stream. (#5)
* docs: add documentation for iterating over channels

* fix: deduplicate protomux instances for the same stream

creating multiple channels on multiple muxers for the same stream closes
channels accidently see
[here](https://gist.github.com/Nazeh/a3f1d24b597913303afcb6c568f4b042)

* fix: deduplicate muxers on the same stream

opening multiple channels on multiple muxers causes channels to either
close or reset, see
[here](https://gist.github.com/Nazeh/a3f1d24b597913303afcb6c568f4b042)

* use userData
2022-08-31 12:49:19 +02:00
Kasper Isager Dalsgarð 88df528516
Add `aliases` option (#4)
* Add `aliases` option

* Clear aliases on GC
2022-08-13 00:52:34 +02:00
Mathias Buus 5606c5ef85 auto split corks if they get too big 2022-07-06 14:39:04 +02:00
Mathias Buus c98b9489fa end on end 2022-03-24 15:19:55 +01:00
Mathias Buus 0e5095aa35 re-add destroy 2022-03-11 19:46:06 +01:00
Mathias Buus 21415211e7 session -> channel and make open explicit for easier control 2022-03-11 13:55:39 +01:00
Mathias Buus 8aff462da3 add isProtomux helper 2022-03-11 02:18:31 +01:00
Mathias Buus 22acc08aa1 set backlog to infinity for now 2022-03-11 02:11:45 +01:00
Mathias Buus b3b9565081 context should be the first arg 2022-03-11 02:09:55 +01:00
Mathias Buus b266f01bf2 pass session to onopen/onclose and ondestroy for consistency 2022-03-10 23:38:18 +01:00
Mathias Buus 576e08180f move to sessions 2022-03-10 23:08:37 +01:00
Mathias Buus e2d05941d6
use message object api (#1) 2022-02-01 19:09:56 +01:00
Mathias Buus 534c417ed0 Protomux.from 2022-01-28 16:00:09 +01:00
Mathias Buus 45e10f4bec rewrote it 2021-12-30 21:13:47 +01:00
Mathias Buus c70c9f989f fix some bugs, iterate the api 2021-12-27 16:09:34 +01:00
Mathias Buus ce309533f4 first commit 2021-11-10 15:15:09 +01:00