@mercuryworkshop/epoxy-transport
Advanced tools
Comparing version 2.1.6 to 2.1.7
{ | ||
"name": "@mercuryworkshop/epoxy-transport", | ||
"version": "2.1.6", | ||
"version": "2.1.7", | ||
"description": "a bare transport that implements end-to-end encryption with epoxy-tls and wisp", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.mjs", |
import type { BareHeaders, TransferrableResponse, BareTransport } from "@mercuryworkshop/bare-mux"; | ||
import epoxy from "@mercuryworkshop/epoxy-tls"; | ||
export default class EpoxyClient implements BareTransport { | ||
import initEpoxy, { EpoxyClient, EpoxyClientOptions, EpoxyHandlers } from "@mercuryworkshop/epoxy-tls"; | ||
export default class EpoxyTransport implements BareTransport { | ||
canstart = true; | ||
@@ -17,3 +17,3 @@ epxclient: Awaited<ReturnType<any>>["EpoxyClient"]["prototype"] = null!; | ||
async init() { | ||
const { EpoxyClient, EpoxyClientOptions, EpoxyHandlers } = await epoxy(); | ||
await initEpoxy(); | ||
@@ -65,3 +65,3 @@ let options = new EpoxyClientOptions(); | ||
onerror: (error: string) => void, | ||
): [ (data: Blob | ArrayBuffer | string) => void, (code: number, reason: string) => void ] { | ||
): [(data: Blob | ArrayBuffer | string) => void, (code: number, reason: string) => void] { | ||
let handlers = new this.EpoxyHandlers( | ||
@@ -80,3 +80,3 @@ onopen, | ||
return [ | ||
return [ | ||
async (data) => { | ||
@@ -83,0 +83,0 @@ (await epsocket).send(data); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
5211228
23980