Code example for Selector

Methods: close

0
            ssc.close();
        } catch (Exception e) {
            // do nothing 
        } 
        try { 
            selector.close();
        } catch (Exception e) {
            // do nothing 
        } 
        super.tearDown(); 
    } 
 
    // http://code.google.com/p/android/issues/detail?id=4237 
    public void test_connectFinish_fails() 
            throws Exception { 
 
        final SocketChannel channel = SocketChannel.open();
        channel.configureBlocking(false);
        channel.register(selector, SelectionKey.OP_CONNECT);
        final Boolean[] fail = new Boolean[1];
        new Thread() {