@Test public void timoutOnConnection() throws Exception { StreamConnector sca = new StreamConnector(); BitrustedConnector connector = new BitrustedConnector( TestKeys.privateKey(0), sca.getInputStream(), new ByteArrayOutputStream() ); connector.setHandshakeTimeoutMillis(10); try { connector.connect(null); fail("must throw TimeoutException"); } catch (TimeoutException x) { // all ok } }
try { Socket in = ss.accept(); BitrustedConnector bc = new BitrustedConnector(TestKeys.privateKey(0), in.getInputStream(), in.getOutputStream() Farcall f = new Farcall(new BitrustedConnector( TestKeys.privateKey(1), s.getInputStream(),
StreamConnector sca = new StreamConnector(); StreamConnector scb = new StreamConnector(); BitrustedConnector ca = new BitrustedConnector( TestKeys.privateKey(0), sca.getInputStream(), scb.getOutputStream() ); BitrustedConnector cb = new BitrustedConnector( TestKeys.privateKey(1), scb.getInputStream(),
StreamConnector sca = new StreamConnector(); StreamConnector scb = new StreamConnector(); BitrustedConnector ca = new BitrustedConnector( TestKeys.privateKey(0), sca.getInputStream(), scb.getOutputStream() ); BitrustedConnector cb = new BitrustedConnector( TestKeys.privateKey(1), scb.getInputStream(),
StreamConnector sca = new StreamConnector(); StreamConnector scb = new StreamConnector(); BitrustedConnector ca = new BitrustedConnector( TestKeys.privateKey(0), sca.getInputStream(), scb.getOutputStream() ); BitrustedConnector cb = new BitrustedConnector( TestKeys.privateKey(1), scb.getInputStream(),