enhanced-datachannel
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21175
12
474