public ServerWorker(ProxySettings settings, string remoteHost, ClientWorker clientWorker, SocketWrapper clientSocket) : base(settings) { this.remoteHost = remoteHost; this.clientWorker = clientWorker; this.clientSocket = clientSocket; this.inspectorFactory = settings.InspectorFactory; }
private void HandleAsyncConnection(IAsyncResult result) { connectionWaitHandle.Set(); Socket listener = (Socket)result.AsyncState; Socket workerSocket = listener.EndAccept(result); var proxy = new ClientWorker(workerSocket, this.settings); proxy.StartRelay(); }