Create a channel that is connected locally. Perfect for testing.
Official method:
npm install --save ancient-transport-local
/* Connect clients */
import { client_1, client_2 } from 'ancient-transport-local';
/* Override function receiving packets */
client_1.gotPackage = function (data, channel) {
console.info(`Channel #1: ${data}`);
};
client_2.gotPackage = function (data, channel) {
console.info(`Channel #2: ${data}`);
};
// Use it!
MIT. Copyright (c) AncientSouls.