Socket
Socket
Sign inDemoInstall

@geckos.io/client

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@geckos.io/client - npm Package Compare versions

Comparing version 2.0.0-dev.2 to 2.0.0-dev.3

0

lib/bundle.d.ts
import client from './geckos/channel';
export default client;
//# sourceMappingURL=bundle.d.ts.map

@@ -0,0 +0,0 @@ "use strict";

12

lib/geckos/channel.d.ts

@@ -5,7 +5,7 @@ import * as Types from '@geckos.io/common/lib/types';

userData: {};
private bridge;
private connectionsManager;
private peerConnection;
private connectionsManager;
private receivedReliableMessages;
private url;
private bridge;
private receivedReliableMessages;
constructor(url: string, authorization: string | undefined, port: number | null, label: string, rtcConfiguration: RTCConfiguration);

@@ -51,7 +51,7 @@ private onconnectionstatechange;

* The geckos.io client library.
* @param options.url The url of the server. Default: \`${location.protocol}//${location.hostname}\`.
* @param options.port The port of the server. Default: 9208.
* @param options.label The label of the DataChannel. Default: 'geckos.io'.
* @param options.iceServers An array of RTCIceServers. See https://developer.mozilla.org/en-US/docs/Web/API/RTCIceServer.
* @param options.iceTransportPolicy RTCIceTransportPolicy enum defines string constants which can be used to limit the transport policies of the ICE candidates to be considered during the connection process.
* @param options.label The label of the DataChannel. Default: 'geckos.io'.
* @param options.port The port of the server. Default: 9208.
* @param options.url The url of the server. Default: \`${location.protocol}//${location.hostname}\`.
*/

@@ -58,0 +58,0 @@ declare const geckosClient: (options?: Types.ClientOptions) => ClientChannel;

@@ -43,6 +43,6 @@ "use strict";

exports.ClientChannel = void 0;
var connectionsManager_1 = __importDefault(require("../wrtc/connectionsManager"));
var peerConnection_1 = __importDefault(require("../wrtc/peerConnection"));
var constants_1 = require("@geckos.io/common/lib/constants");
var reliableMessage_1 = require("@geckos.io/common/lib/reliableMessage");
var constants_1 = require("@geckos.io/common/lib/constants");
var peerConnection_1 = __importDefault(require("../wrtc/peerConnection"));
var connectionsManager_1 = __importDefault(require("../wrtc/connectionsManager"));
var ClientChannel = /** @class */ (function () {

@@ -82,3 +82,3 @@ function ClientChannel(url, authorization, port, label, rtcConfiguration) {

try {
var host = this.url + "/.wrtc/v1";
var host = this.url + "/.wrtc/v2";
fetch(host + "/connections/" + this.id + "/close", {

@@ -221,11 +221,11 @@ method: 'POST',

* The geckos.io client library.
* @param options.url The url of the server. Default: \`${location.protocol}//${location.hostname}\`.
* @param options.port The port of the server. Default: 9208.
* @param options.label The label of the DataChannel. Default: 'geckos.io'.
* @param options.iceServers An array of RTCIceServers. See https://developer.mozilla.org/en-US/docs/Web/API/RTCIceServer.
* @param options.iceTransportPolicy RTCIceTransportPolicy enum defines string constants which can be used to limit the transport policies of the ICE candidates to be considered during the connection process.
* @param options.label The label of the DataChannel. Default: 'geckos.io'.
* @param options.port The port of the server. Default: 9208.
* @param options.url The url of the server. Default: \`${location.protocol}//${location.hostname}\`.
*/
var geckosClient = function (options) {
if (options === void 0) { options = {}; }
var _a = options.iceServers, iceServers = _a === void 0 ? [] : _a, _b = options.iceTransportPolicy, iceTransportPolicy = _b === void 0 ? 'all' : _b, _c = options.url, url = _c === void 0 ? location.protocol + "//" + location.hostname : _c, _d = options.authorization, authorization = _d === void 0 ? undefined : _d, _e = options.port, port = _e === void 0 ? 9208 : _e, _f = options.label, label = _f === void 0 ? 'geckos.io' : _f;
var _a = options.authorization, authorization = _a === void 0 ? undefined : _a, _b = options.iceServers, iceServers = _b === void 0 ? [] : _b, _c = options.iceTransportPolicy, iceTransportPolicy = _c === void 0 ? 'all' : _c, _d = options.label, label = _d === void 0 ? 'geckos.io' : _d, _e = options.port, port = _e === void 0 ? 9208 : _e, _f = options.url, url = _f === void 0 ? location.protocol + "//" + location.hostname : _f;
return new ClientChannel(url, authorization, port, label, { iceServers: iceServers, iceTransportPolicy: iceTransportPolicy });

@@ -232,0 +232,0 @@ };

@@ -0,0 +0,0 @@ import client, { ClientChannel } from './geckos/channel';

@@ -0,0 +0,0 @@ "use strict";

@@ -12,8 +12,8 @@ import { Bridge } from '@geckos.io/common/lib/bridge';

rtcConfiguration: RTCConfiguration;
bridge: Bridge;
dataChannel: RTCDataChannel;
id: ChannelId;
localPeerConnection: RTCPeerConnection;
maxMessageSize: number | undefined;
localPeerConnection: RTCPeerConnection;
remotePeerConnection: RTCRemotePeerConnection;
dataChannel: RTCDataChannel;
id: ChannelId;
bridge: Bridge;
emit(eventName: EventName, data?: Data | RawMessage | null): void;

@@ -20,0 +20,0 @@ constructor(url: string, authorization: string | undefined, label: string, rtcConfiguration: RTCConfiguration);

@@ -53,5 +53,5 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var bridge_1 = require("@geckos.io/common/lib/bridge");
var parseMessage_1 = __importDefault(require("@geckos.io/common/lib/parseMessage"));
var sendMessage_1 = __importDefault(require("@geckos.io/common/lib/sendMessage"));
var bridge_1 = require("@geckos.io/common/lib/bridge");
var ConnectionsManagerClient = /** @class */ (function () {

@@ -119,3 +119,3 @@ function ConnectionsManagerClient(url, authorization, label, rtcConfiguration) {

case 0:
host = this.url + "/.wrtc/v1";
host = this.url + "/.wrtc/v2";
headers = { 'Content-Type': 'application/json' };

@@ -122,0 +122,0 @@ if (this.authorization)

import ConnectionsManagerClient from './connectionsManager';
import { ChannelId } from '@geckos.io/common/lib/types';
export default class PeerConnection {
localPeerConnection: RTCPeerConnection;
dataChannel: RTCDataChannel;
id: ChannelId;
localPeerConnection: RTCPeerConnection;
connect(connectionsManager: ConnectionsManagerClient): Promise<{

@@ -8,0 +8,0 @@ error: any;

@@ -0,0 +0,0 @@ "use strict";

{
"name": "@geckos.io/client",
"version": "2.0.0-dev.2",
"version": "2.0.0-dev.3",
"description": "Real-time client/server communication over UDP using WebRTC and Node.js",

@@ -44,3 +44,3 @@ "main": "./lib/index.js",

"dependencies": {
"@geckos.io/common": "^2.0.0-dev.2"
"@geckos.io/common": "^2.0.0-dev.3"
},

@@ -47,0 +47,0 @@ "funding": {

@@ -0,0 +0,0 @@ <a href="http://geckos.io">

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc