UNPKG

@skyway-sdk/core

Version:

The official Next Generation JavaScript SDK for SkyWay

50 lines 2.38 kB
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.UnknownConnection = void 0; const common_1 = require("@skyway-sdk/common"); const log = new common_1.Logger('packages/core/src/plugin/internal/unknown/connection.ts'); class UnknownConnection { constructor(localPerson, remoteMember) { this.localPerson = localPerson; this.remoteMember = remoteMember; this.type = 'unknown'; this.onDisconnect = new common_1.Event(); this.onClose = new common_1.Event(); this.closed = false; } close() { this.closed = true; this.onClose.emit(); } startPublishing(publication) { return __awaiter(this, void 0, void 0, function* () { log.debug(`this is unknown type connection. should install ${this.remoteMember.subtype} plugin`, { publication }); }); } stopPublishing(publication) { return __awaiter(this, void 0, void 0, function* () { log.debug(`this is unknown type connection. should install ${this.remoteMember.subtype} plugin`, { publication }); }); } startSubscribing(subscription) { return __awaiter(this, void 0, void 0, function* () { log.debug(`this is unknown type connection. should install ${this.remoteMember.subtype} plugin`, { subscription }); }); } stopSubscribing(subscription) { return __awaiter(this, void 0, void 0, function* () { log.debug(`this is unknown type connection. should install ${this.remoteMember.subtype} plugin`, { subscription }); }); } } exports.UnknownConnection = UnknownConnection; //# sourceMappingURL=connection.js.map