/// /// /// import peerconnection = require('../../../third_party/uproxy-lib/webrtc/peerconnection'); import signals = require('../../../third_party/uproxy-lib/webrtc/signals'); import handler = require('../../../third_party/uproxy-lib/handler/queue'); import net = require('../net/net.types'); import tcp = require('../net/tcp'); declare module SocksToRtc { class SocksToRtc { private dispatchEvent_; private fulfillStopping_; private onceStopping_; private onceStopped_; private bytesReceivedFromPeer_; private bytesSentToPeer_; private tcpServer_; private peerConnection_; private pool_; on: (t: string, f: (m: any) => void) => void; private listeners_; constructor(dispatchEvent_?: (t: string, m: Object) => void); startFromConfig: (localSocksServerEndpoint: net.Endpoint, pcConfig: freedom_RTCPeerConnection.RTCConfiguration, obfuscate?: boolean) => Promise; start: (tcpServer: tcp.Server, peerconnection: peerconnection.PeerConnection) => Promise; stop: () => Promise; private fallbackDispatchEvent_; private fallbackOn_; private stopResources_; private makeTcpToRtcSession_; handleSignalFromPeer: (signal: signals.Message) => void; toString: () => string; } class Session { private tcpConnection_; private dataChannel_; private bytesSentToPeer_; private bytesReceivedFromPeer_; onceReady: Promise; private fulfillStopping_; private onceStopping_; onceStopped: Promise; start: (tcpConnection: tcp.Connection, dataChannel: peerconnection.DataChannel, bytesSentToPeer: handler.Queue, bytesReceivedFromPeer: handler.Queue) => Promise; longId: () => string; stop: () => Promise; private stopResources_; channelLabel: () => string; toString: () => string; private doAuthHandshake_; private doRequestHandshake_; private sendOnChannel_; private sendOnSocket_; private linkSocketAndChannel_; } } export = SocksToRtc;