Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

enhanced-datachannel

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enhanced-datachannel - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

CHANGELOG.md

10

lib/based-datachannel.d.ts

@@ -22,8 +22,8 @@ import EventEmitter from "eventemitter3";

handleEvent(ev: Event): void;
_handleOpen(): void;
_handleClose(): void;
_handleError(ev: RTCErrorEvent): void;
_handleMessage(ev: MessageEvent): void;
_handleBufferedAmountLow(): void;
protected _handleOpen(): void;
protected _handleClose(): void;
protected _handleError(ev: RTCErrorEvent): void;
protected _handleMessage(ev: MessageEvent): void;
protected _handleBufferedAmountLow(): void;
}
export default BasedDataChannel;

@@ -9,11 +9,13 @@ import BasedDataChannel from "./based-datachannel";

declare class ChunkedDataChannel extends BasedDataChannel {
_sending: boolean;
_recving: boolean;
_recvBuffer: ArrayBuffer[];
private _sending;
private _recving;
private _recvBuffer;
constructor(dc: RTCDataChannel);
readonly sending: boolean;
readonly recving: boolean;
binaryType: string;
close(): void;
send(data: Blob, meta?: JSONObject): Promise<void>;
_handleMessage(ev: MessageEvent): void;
protected _handleMessage(ev: MessageEvent): void;
}
export default ChunkedDataChannel;

@@ -21,2 +21,8 @@ "use strict";

}
get sending() {
return this._sending;
}
get recving() {
return this._recving;
}
set binaryType(_type) {

@@ -23,0 +29,0 @@ throw new Error("Can not change binaryType!");

@@ -8,18 +8,2 @@ import BasedDataChannel from "./based-datachannel";

}
interface Request {
type: number;
id: string;
data: JSONValue;
}
interface SuccessResponse {
type: number;
id: string;
data: JSONValue;
}
interface ErrorResponse {
type: number;
id: string;
err: string;
}
declare type SendPayload = Request | SuccessResponse | ErrorResponse;
declare class PromisedDataChannel extends BasedDataChannel {

@@ -30,7 +14,7 @@ private _sentRequests;

send(data: JSONValue): Promise<JSONValue>;
_sendMessage(data: SendPayload): void;
_handleMessage(ev: MessageEvent): void;
_handleRequest(request: Request): void;
_handleResponse(response: SuccessResponse | ErrorResponse): void;
private _sendMessage;
protected _handleMessage(ev: MessageEvent): void;
private _handleRequest;
private _handleResponse;
}
export default PromisedDataChannel;
{
"name": "enhanced-datachannel",
"version": "1.0.1",
"version": "1.1.0",
"description": "Wanna `enhance(RTCDataChannel)` for general usage.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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