mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-25 00:23:12 +09:00
Add note about send and bcast test functions
This commit is contained in:
1 parent
847945cfdd
commit
2a57ddb02e
1 file changed
+6
@@ -164,6 +164,9 @@ describe("Integration of link routing", function() {
|
|||||||
* @param {Address} dst
|
* @param {Address} dst
|
||||||
*/
|
*/
|
||||||
function send(link, dst, message) {
|
function send(link, dst, message) {
|
||||||
|
// This logic exists becasue .sendTo doesn't forward all kinds of
|
||||||
|
// messages to the correct location from all places. Idealy this
|
||||||
|
// would not be neccessary and .sendTo would do the right thing.
|
||||||
if (link instanceof Host) {
|
if (link instanceof Host) {
|
||||||
const instance = link.instanceConnections.get(dst.id);
|
const instance = link.instanceConnections.get(dst.id);
|
||||||
if (instance) {
|
if (instance) {
|
||||||
@@ -208,6 +211,9 @@ describe("Integration of link routing", function() {
|
|||||||
* @param {"allHosts" | "allInstances" | "allControls"} dst
|
* @param {"allHosts" | "allInstances" | "allControls"} dst
|
||||||
*/
|
*/
|
||||||
function bcast(link, dst, message) {
|
function bcast(link, dst, message) {
|
||||||
|
// This logic exists becasue .sendTo doesn't forward all kinds of
|
||||||
|
// messages to the correct location from all places. Idealy this
|
||||||
|
// would not be neccessary and .sendTo would do the right thing.
|
||||||
if (link instanceof Host) {
|
if (link instanceof Host) {
|
||||||
const plugin = message.constructor.plugin;
|
const plugin = message.constructor.plugin;
|
||||||
if (dst === "allInstances") {
|
if (dst === "allInstances") {
|
||||||
|
|||||||
Reference in new issue
Block a user