Beispiel #1
0
 public ProxyServer(Action <string> logWarning, AndroidPortReverser portReverser, int port)
 {
     _socketServer = SocketServer.Start(port, ClientThread);
     _logWarning   = logWarning;
     _portReverser = portReverser;
     _isEmpty.OnNext(Unit.Default);
 }
Beispiel #2
0
 public static void ReversePortOrLogErrors(this AndroidPortReverser portReverser, IReport log, int remotePort, int localPort)
 {
     try
     {
         portReverser.ReversePort(remotePort, localPort);
     }
     catch (AndroidReversePortFailed e)
     {
         log.Exception("Failed to reverse port", e);
     }
 }