2
0
mirror of https://github.com/esiur/esiur-js.git synced 2026-04-04 05:58:22 +00:00

Static Calling

This commit is contained in:
2022-08-07 23:08:33 +03:00
parent 551f0f4684
commit bf861395c3
10 changed files with 429 additions and 77 deletions

View File

@@ -29,6 +29,7 @@
import IResource from '../../Resource/IResource.js';
import AsyncReply from '../../Core/AsyncReply.js';
import DistributedConnection from './DistributedConnection.js';
import KeyList from '../../Data/KeyList.js';
export default class DistributedServer extends IResource
{
@@ -56,6 +57,7 @@ export default class DistributedServer extends IResource
{
super();
this.connections = [];
this.calls = new KeyList();
}
//@TODO: con.off("close", ...)
@@ -72,4 +74,10 @@ export default class DistributedServer extends IResource
if (i > -1)
this.connections.splice(i, 1);
}
mapCall(call, handler)
{
this.calls.add(call, handler);
}
}