UNPKG

stalk-js-webrtc

Version:

S-Talk web-rtc javascript client implementation.

21 lines (20 loc) 721 B
var io = require('socket.io-client'); var SocketIoConnection = /** @class */ (function () { function SocketIoConnection(config) { this.connection = io.connect(config.url, config.socketio); } SocketIoConnection.prototype.on = function (ev, fn) { this.connection.on(ev, fn); }; SocketIoConnection.prototype.emit = function () { this.connection.emit.apply(this.connection, arguments); }; SocketIoConnection.prototype.getSessionid = function () { return this.connection.id; }; SocketIoConnection.prototype.disconnect = function () { return this.connection.disconnect(); }; return SocketIoConnection; }()); export default SocketIoConnection;