217218219220221222223224225226227
int n = s.getInputStream().read(buf); String res = new String(buf, 0, n); assertEquals("Hello", res); s.close(); session.delPortForwardingL(forwardedPort); session.disconnect(); } @Test public void testLocalForwardingNative() throws Exception {
186187188189190191192193194195196
if (s != null) { s.close(); } } } session.delPortForwardingL(sinkPort); } @Test public void testRemoteForwardingPayload() throws Exception { final int NUM_ITERATIONS = 100;
189190191192193194195196197198199
158159160161162163164165166167168
int n = s.getInputStream().read(buf); String res = new String(buf, 0, n); assertEquals("Hello", res); s.close(); session.delPortForwardingL(forwardedPort); // session.setPortForwardingL(8010, "www.amazon.com", 80); // Thread.sleep(1000000); }
182183184185186187188189190191192
int n = s.getInputStream().read(buf); String res = new String(buf, 0, n); assertEquals("Hello", res); s.close(); session.delPortForwardingL(forwardedPort); } @Test public void testLocalForwardingNative() throws Exception { ClientSession session = createNativeSession();
192193194195196197198199200201202