Compare commits
No commits in common. "v0.1.0-develop.3" and "v0.1.0-develop.2" have entirely different histories.
v0.1.0-dev
...
v0.1.0-dev
|
@ -1,10 +1,3 @@
|
||||||
# [0.1.0-develop.3](https://git.lumeweb.com/LumeWeb/kernel-swarm/compare/v0.1.0-develop.2...v0.1.0-develop.3) (2023-07-23)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* add socketSetKeepAlive api method ([ac58773](https://git.lumeweb.com/LumeWeb/kernel-swarm/commit/ac5877385b96b7162a646cadc9b9512759f21bbb))
|
|
||||||
|
|
||||||
# [0.1.0-develop.2](https://git.lumeweb.com/LumeWeb/kernel-swarm/compare/v0.1.0-develop.1...v0.1.0-develop.2) (2023-07-23)
|
# [0.1.0-develop.2](https://git.lumeweb.com/LumeWeb/kernel-swarm/compare/v0.1.0-develop.1...v0.1.0-develop.2) (2023-07-23)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@lumeweb/kernel-swarm",
|
"name": "@lumeweb/kernel-swarm",
|
||||||
"version": "0.1.0-develop.3",
|
"version": "0.1.0-develop.2",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@lumeweb/kernel-swarm",
|
"name": "@lumeweb/kernel-swarm",
|
||||||
"version": "0.1.0-develop.3",
|
"version": "0.1.0-develop.2",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@lumeweb/hyperswarm-web": "0.0.2-develop.8",
|
"@lumeweb/hyperswarm-web": "0.0.2-develop.8",
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
"patch-package": "^7.0.0",
|
"patch-package": "^7.0.0",
|
||||||
"presetter": "*"
|
"presetter": "*"
|
||||||
},
|
},
|
||||||
"version": "0.1.0-develop.3",
|
"version": "0.1.0-develop.2",
|
||||||
"readme": "ERROR: No README data found!",
|
"readme": "ERROR: No README data found!",
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"buffer": "^6.0.3"
|
"buffer": "^6.0.3"
|
||||||
|
|
20
src/index.ts
20
src/index.ts
|
@ -82,7 +82,6 @@ addHandler("socketListenEvent", handleSocketListenEvent, {
|
||||||
addHandler("socketListeners", handleSocketListenersEvent);
|
addHandler("socketListeners", handleSocketListenersEvent);
|
||||||
addHandler("socketWrite", handleWriteSocketEvent);
|
addHandler("socketWrite", handleWriteSocketEvent);
|
||||||
addHandler("socketClose", handleCloseSocketEvent);
|
addHandler("socketClose", handleCloseSocketEvent);
|
||||||
addHandler("socketSetKeepAlive", handleSocketSetKeepAliveEvent);
|
|
||||||
addHandler("createProtomuxChannel", handleCreateProtomuxChannel, {
|
addHandler("createProtomuxChannel", handleCreateProtomuxChannel, {
|
||||||
receiveUpdates: true,
|
receiveUpdates: true,
|
||||||
});
|
});
|
||||||
|
@ -241,25 +240,6 @@ function handleCloseSocketEvent(aq: ActiveQuery) {
|
||||||
aq.respond();
|
aq.respond();
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleSocketSetKeepAliveEvent(aq: ActiveQuery) {
|
|
||||||
const socket = validateConnection(aq);
|
|
||||||
|
|
||||||
if (!socket) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const { alive = null } = aq.callerInput;
|
|
||||||
|
|
||||||
if (!alive) {
|
|
||||||
aq.reject("alive required");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
socket.setKeepAlive(aq.callerInput.alive);
|
|
||||||
|
|
||||||
aq.respond();
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handleWriteSocketEvent(aq: ActiveQuery) {
|
async function handleWriteSocketEvent(aq: ActiveQuery) {
|
||||||
const socket = validateConnection(aq);
|
const socket = validateConnection(aq);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue