Compare commits
No commits in common. "402508ca649400a1182597719370506712b69708" and "2832694cd5d11ee54a4ba74cef967384c7e58ad1" have entirely different histories.
402508ca64
...
2832694cd5
13
src/index.ts
13
src/index.ts
|
@ -75,13 +75,12 @@ addHandler("socketListenEvent", handleSocketListenEvent, {
|
|||
});
|
||||
addHandler("socketWrite", handleWriteSocketEvent);
|
||||
addHandler("socketClose", handleCloseSocketEvent);
|
||||
addHandler("createProtomuxChannel", handleCreateProtomuxChannel, {
|
||||
addHandler("createProtomuxChannel", createProtomuxChannel, {
|
||||
receiveUpdates: true,
|
||||
});
|
||||
addHandler("createProtomuxMessage", handleCreateProtomuxMessage, {
|
||||
addHandler("createProtomuxMessage", createProtomuxMessage, {
|
||||
receiveUpdates: true,
|
||||
});
|
||||
addHandler("createSwarm", handleCreateSwarm);
|
||||
|
||||
async function handlePresentSeed(aq: ActiveQuery) {
|
||||
const pubkey = await ed.getPublicKey(aq.callerInput.rootKey);
|
||||
|
@ -426,7 +425,7 @@ async function handleGetSocketInfo(aq: ActiveQuery) {
|
|||
});
|
||||
}
|
||||
|
||||
async function handleCreateProtomuxChannel(aq: ActiveQuery) {
|
||||
async function createProtomuxChannel(aq: ActiveQuery) {
|
||||
const socket = validateConnection(aq);
|
||||
|
||||
if (!socket) {
|
||||
|
@ -489,7 +488,7 @@ async function handleCreateProtomuxChannel(aq: ActiveQuery) {
|
|||
aq.sendUpdate(channelId);
|
||||
}
|
||||
|
||||
async function handleCreateProtomuxMessage(aq: ActiveQuery) {
|
||||
async function createProtomuxMessage(aq: ActiveQuery) {
|
||||
const socket = validateConnection(aq);
|
||||
|
||||
if (!socket) {
|
||||
|
@ -590,10 +589,6 @@ async function handleCreateProtomuxMessage(aq: ActiveQuery) {
|
|||
});
|
||||
}
|
||||
|
||||
async function handleCreateSwarm(aq: ActiveQuery) {
|
||||
aq.respond(await createSwarm());
|
||||
}
|
||||
|
||||
function getSwarmToSocketConnectionId(socket: any) {
|
||||
for (const conn of connections) {
|
||||
if (conn[1].conn === socket) {
|
||||
|
|
Loading…
Reference in New Issue