()
| 88 | } |
| 89 | |
| 90 | public void start() throws Exception { |
| 91 | clientFlowSourceThread = new Thread(new Runnable() { |
| 92 | |
| 93 | public void run() { |
| 94 | try { |
| 95 | |
| 96 | byte[] inputBuf = new byte[65536]; |
| 97 | int inputLen = 0; |
| 98 | while ((inputLen = flow_controlled_client_input.read(inputBuf)) > 0) { |
| 99 | |
| 100 | callOnClientChunkFlowControl(ArrayUtils.subarray(inputBuf, 0, inputLen)); |
| 101 | } |
| 102 | flow_controlled_client_input.close(); |
| 103 | closeOnClientChunkFlowControl(); |
| 104 | } catch (Exception e) { |
| 105 | |
| 106 | // errWithStackTrace(e); |
| 107 | } |
| 108 | } |
| 109 | }); |
| 110 | |
| 111 | serverFlowSourceThread = new Thread(new Runnable() { |
| 112 | |
| 113 | public void run() { |
| 114 | try { |
| 115 | |
| 116 | byte[] inputBuf = new byte[65536]; |
| 117 | int inputLen = 0; |
| 118 | while ((inputLen = flow_controlled_server_input.read(inputBuf)) > 0) { |
| 119 | |
| 120 | callOnServerChunkFlowControl(ArrayUtils.subarray(inputBuf, 0, inputLen)); |
| 121 | } |
| 122 | flow_controlled_server_input.close(); |
| 123 | closeOnServerChunkFlowControl(); |
| 124 | } catch (Exception e) { |
| 125 | |
| 126 | // errWithStackTrace(e); |
| 127 | } |
| 128 | } |
| 129 | }); |
| 130 | |
| 131 | clientFlowSinkThread = new Thread(new Runnable() { |
| 132 | |
| 133 | public void run() { |
| 134 | try { |
| 135 | |
| 136 | byte[] inputBuf = new byte[65536]; |
| 137 | int inputLen = 0; |
| 138 | while ((inputLen = getClientChunkFlowControlSink().read(inputBuf)) > 0) { |
| 139 | |
| 140 | client_output.write(inputBuf, 0, inputLen); |
| 141 | client_output.flush(); |
| 142 | } |
| 143 | flow_controlled_client_input.close(); |
| 144 | client_output.close(); |
| 145 | } catch (Exception e) { |
| 146 | |
| 147 | try { |
no outgoing calls
no test coverage detected