libhyperproxy/dist/proxy.d.ts

22 lines
723 B
TypeScript
Raw Normal View History

2023-01-12 17:50:38 +00:00
import { PeerOptions, DataSocketOptions } from "./peer.js";
export interface ProxyOptions extends DataSocketOptions {
swarm: any;
protocol: string;
listen?: boolean;
autostart?: boolean;
}
export default class Proxy {
private _listen;
private _socketOptions;
private _autostart;
2023-03-15 12:14:29 +00:00
constructor({ swarm, protocol, onopen, onreceive, onsend, onclose, onchannel, listen, autostart, emulateWebsocket, createDefaultMessage, }: ProxyOptions);
2023-01-12 17:50:38 +00:00
private _swarm;
get swarm(): any;
private _protocol;
get protocol(): string;
handlePeer({ peer, muxer, ...options }: DataSocketOptions & PeerOptions): void;
protected _init(): void;
private init;
private _handleConnection;
}