()
| 96 | } |
| 97 | |
| 98 | public void run(){ |
| 99 | |
| 100 | try{ |
| 101 | if(mSocket == null) |
| 102 | mSocket = new ServerSocket(mPort, BACKLOG, mAddress); |
| 103 | |
| 104 | Log.d(TAG, "Proxy started on " + mAddress + ":" + mPort); |
| 105 | |
| 106 | mRunning = true; |
| 107 | |
| 108 | while(mRunning && mSocket != null){ |
| 109 | try{ |
| 110 | Profiler.instance().profile("client spawn"); |
| 111 | |
| 112 | Socket client = mSocket.accept(); |
| 113 | |
| 114 | new ProxyThread(client, mRequestListener, mFilters, mHostRedirect, mPortRedirect).start(); |
| 115 | |
| 116 | Profiler.instance().profile("client spawn"); |
| 117 | } catch(Exception e){ |
| 118 | |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | Log.d(TAG, "Proxy stopped."); |
| 123 | } catch(IOException e){ |
| 124 | System.errorLogging(e); |
| 125 | } |
| 126 | } |
| 127 | } |
nothing calls this directly
no test coverage detected