Code example for SocketChannel

Methods: isConnected

0
        return socketChannel.socket();
    } 
 
    @Override 
    public boolean isConnected() { 
        return socketChannel.isConnected();
    } 
 
    @Override 
    public boolean isConnectionPending() { 
        return socketChannel.isConnectionPending();
    } 
 
    @Override 
    public boolean finishConnect() throws IOException { 
        return socketChannel.finishConnect();
    } 
 
    public void setConnectTimeout(int t) {
        connectTimeout = t;
    }