Derrick Hammer
402508ca64
*rename handlers to match naming scheme
2023-04-15 03:58:53 -04:00
Derrick Hammer
ba38f7670f
*Add api method to create swarms
2023-04-15 03:57:34 -04:00
Derrick Hammer
2832694cd5
*Switch to using message id based tracking
2023-04-09 02:27:56 -04:00
Derrick Hammer
acade9801f
Revert "*Add support for destroy"
...
This reverts commit b42069231c
.
2023-04-08 22:55:05 -04:00
Derrick Hammer
b42069231c
*Add support for destroy
2023-04-08 22:50:56 -04:00
Derrick Hammer
40c042bb49
*Update to use kernel fork of protomux
2023-04-08 22:02:59 -04:00
Derrick Hammer
7206624cb5
* Refactor index.ts by checking if ret[1].buffer exists before assigning it to args[0].buffer, updating the update function to decode instead of encode, sending message if the action is "send", updating onmessage to include only relevant arguments, and adding a noop function.
2023-04-08 20:07:10 -04:00
Derrick Hammer
64ec4bb91c
*Just open the channel on creation
2023-04-08 14:47:12 -04:00
Derrick Hammer
4712b50447
*Fix LICENSE
2023-04-08 14:05:53 -04:00
Derrick Hammer
dc806ba98e
*Use ?. on constructor
2023-04-07 21:50:05 -04:00
Derrick Hammer
875af27733
*Refactor again to use an api for protomux channels and messages
2023-04-07 19:48:23 -04:00
Derrick Hammer
41751c7d2b
*If for some reason we responded by the time we try to send an update, just abort
2023-04-06 18:07:51 -04:00
Derrick Hammer
86a3881cfb
*remove debug
2023-04-06 17:46:21 -04:00
Derrick Hammer
44a9838490
*release mutex
2023-04-06 17:02:54 -04:00
Derrick Hammer
1bd159c19e
*Switch to a different, simpler method of syncing protomux state
2023-04-06 16:33:08 -04:00
Derrick Hammer
2e62597cd6
*Don't need to toggle our event hook
2023-04-06 14:26:57 -04:00
Derrick Hammer
b8b72450e6
*Notify the slave protomux that we have synced
2023-04-06 13:19:06 -04:00
Derrick Hammer
b8d0af64c7
*Update deps
2023-04-06 13:17:06 -04:00
Derrick Hammer
33b11cbde6
*In getSwarm and swarm init, await on .opened to ensure we are ready, only when we have an active relay
...
*Only set mux.syncState if not previously set
*change mux.syncState to emit syncProtomux
*ensure the state data are numbers
*check for undefined in the state data
2023-04-06 13:16:46 -04:00
Derrick Hammer
4f6f4eacfd
*Need to explicitly add override for protomux
2023-04-05 04:50:25 -04:00
Derrick Hammer
369b1d19a4
*remove the current listeners sync function from the syncProtomux before emitting to not create an infinite loop, and add back after
2023-04-05 03:51:04 -04:00
Derrick Hammer
04528830cf
*switch to protomux fork
2023-04-05 03:47:50 -04:00
Derrick Hammer
053e309d98
*Initial version of syncProtomux api protocol that will keep Protomux channel/message tracking in sync between workers
2023-04-05 02:41:57 -04:00
Derrick Hammer
2f30b743f6
*Move existing connection logic up
2023-04-04 11:22:37 -04:00
Derrick Hammer
c0b99e8146
*When listening for connections, send over any existing connections to the requester as if they are new
2023-04-04 08:07:02 -04:00
Derrick Hammer
dd3d4948d4
*Switch to webcrypto fork
2023-04-04 06:27:27 -04:00
Derrick Hammer
21feb9fa17
*Add crypto subtle polyfill
2023-04-04 06:08:30 -04:00
Derrick Hammer
c31eedd40d
*Update deps
2023-03-29 16:56:08 -04:00
Derrick Hammer
2c3d15c734
*Use swarmEvents not swarm.onceSelf to emit the close
2023-03-29 14:48:15 -04:00
Derrick Hammer
2e1780e28f
*Refactor swarm event management to use a dedicated event emitter per swarm for efficiency
2023-03-19 15:16:51 -04:00
Derrick Hammer
e7a0c381b9
*Set the max event listeners via const on the peer object
2023-03-19 07:19:19 -04:00
Derrick Hammer
6e61420bfd
*update deps
2023-03-18 14:41:30 -04:00
Derrick Hammer
b76f0f12dd
*change close hook to be one time as it does not need to stay hooked, else memory leak
2023-03-18 14:41:20 -04:00
Derrick Hammer
5ea823679f
*remove debug line
2023-02-18 08:44:35 -05:00
Derrick Hammer
2ad6b1fd5d
*Wrap connection event in an init call event to survive the relay being recreated
2023-02-17 22:37:05 -05:00
Derrick Hammer
db079ce214
*If we have an active relay, add close hook, else queue on ready hook to add close hook
2023-02-17 19:16:22 -05:00
Derrick Hammer
a84ea18680
*Update deps
2023-02-17 08:10:22 -05:00
Derrick Hammer
ac7d1a0db5
*only return early if both activeRelay and ready are set
2023-02-17 08:10:14 -05:00
Derrick Hammer
5f733195c4
*Fix typo
2023-02-16 21:57:49 -05:00
Derrick Hammer
2a533d6f7f
*If the dht closes, then remove the connection handler and emit the close event on the swarm
2023-02-16 21:40:40 -05:00
Derrick Hammer
3b6448fec8
*Update deps
2023-02-06 12:33:27 -05:00
Derrick Hammer
379649b006
*Create helper getSwarmToSocketConnectionId
...
*on join method, disable server mode
*rename handleJoinPeer to handleJoin
*rename handleSocketListenEvent to handleSocketListenEvent
*on socketListenEvent, if setReceiveUpdate is ever called, assume we want to terminate
* Ensure full 64 bit private key is passed to handlePresentSeedModule
*Re-organize api methods
*Add new socket methods
*Add socketGetInfo method which creates an IPV6 address from the pubkey
2023-02-06 12:33:11 -05:00
Derrick Hammer
236e445ff8
*Change ready to init
...
*Add new ready method that listens for a ready event but returns if activeRelay is set
2023-02-01 12:07:46 -05:00
Derrick Hammer
4e443f4ccb
*Replace dht references with swarm
2023-02-01 08:18:31 -05:00
Derrick Hammer
d608392532
*Rewrite to use new design
2023-02-01 07:50:45 -05:00
Derrick Hammer
4a62c94ee3
*Rename package
2023-02-01 07:50:11 -05:00
Derrick Hammer
c6497655c7
*Temp build script
2023-02-01 07:49:26 -05:00
Derrick Hammer
44ed118571
*Switch to iife
2023-02-01 07:49:00 -05:00
Derrick Hammer
ce3fbcad0b
*Bug fix and improve response handling
2022-09-19 08:11:54 -04:00
Derrick Hammer
b25706e8ac
*Update DHT management
2022-08-31 17:14:42 -04:00