@geckos.io/server
Version:
Real-time client/server communication over UDP using WebRTC and Node.js
19 lines • 760 B
TypeScript
import { PeerConnection, RtcConfig } from './nodeDataChannel.js';
import Channel from '../geckos/channel.js';
import { ChannelId } from '../deps.js';
import EventEmitter from 'events';
export default class WebRTCConnection extends EventEmitter {
id: string;
configuration: RtcConfig;
connections: Map<ChannelId, WebRTCConnection>;
userData: any;
state: 'open' | 'closed';
peerConnection: PeerConnection;
channel: Channel;
additionalCandidates: RTCIceCandidate[];
private options;
constructor(id: string, configuration: RtcConfig, connections: Map<ChannelId, WebRTCConnection>, userData: any);
init(): Promise<PeerConnection>;
close(state?: string): Promise<void>;
}
//# sourceMappingURL=webrtcConnection.d.ts.map