Code example for ServerSocketChannel

Methods: isBlocking, isRegistered, provider, socket, validOps

0
            // Android doesn't cache the timeout, so the getsockopt(2) fails and throws. 
        } 
    } 
 
    public void testChannelBasicStatus() { 
        ServerSocket gotSocket = this.serverChannel.socket();
        assertFalse(gotSocket.isClosed());
        assertTrue(this.serverChannel.isBlocking());
        assertFalse(this.serverChannel.isRegistered());
        assertEquals(SelectionKey.OP_ACCEPT, this.serverChannel.validOps());
        assertEquals(SelectorProvider.provider(), this.serverChannel.provider());
    } 
 
    // ------------------------------------------------------------------- 
    // Test for accept() 
    // ------------------------------------------------------------------- 
 
    /* 
     * Test method for 'java.nio.channels.ServerSocketChannel.accept()' 
     */