node-insim
Version:
An InSim library for NodeJS with TypeScript support
34 lines (33 loc) • 1.45 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.Protocol = void 0;
var tiny_typed_emitter_1 = require("tiny-typed-emitter");
/** @internal */
var Protocol = /** @class */ (function (_super) {
__extends(Protocol, _super);
function Protocol(_a) {
var host = _a.host, port = _a.port, _b = _a.packetSizeMultiplier, packetSizeMultiplier = _b === void 0 ? 1 : _b;
var _this = _super.call(this) || this;
_this.host = host;
_this.port = port;
_this.packetSizeMultiplier = packetSizeMultiplier;
return _this;
}
return Protocol;
}(tiny_typed_emitter_1.TypedEmitter));
exports.Protocol = Protocol;