UNPKG

steam-condenser

Version:
31 lines 896 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var Socket = /** @class */ (function () { function Socket(address, port) { this.timeout = 30000; var addr = address; this.port = port; if (addr.indexOf(':') !== -1) { var parts = addr.split(':'); addr = parts[0]; this.port = Number.parseInt(parts[1], 10); } this.ipAddress = addr; this.open = false; } Socket.prototype.setTimeout = function (time) { this.timeout = time; }; Socket.prototype.isOpen = function () { if (typeof this.socket === 'undefined') { return false; } return this.open; }; Socket.prototype.resource = function () { return this.socket; }; return Socket; }()); exports.default = Socket; //# sourceMappingURL=Socket.js.map