void sendNextProtocol(NextProtoNego.Provider provider) throws IOException { if (isInitialHandshake && provider != null) { if (protocols == null) { if (NextProtoNego.debug) System.err.println(new StringBuilder("[C] NPN not received for ").append(conn != null ? conn : engine)); ((NextProtoNego.ClientProvider)provider).unsupported(); } else { String protocol = ((NextProtoNego.ClientProvider)provider).selectProtocol(protocols); if (NextProtoNego.debug) System.err.println(new StringBuilder("[C] NPN selected '").append(protocol).append("' for ").append(conn != null ? conn : engine)); if (protocol != null) { new NextProtocolMessage(protocol).write(output); output.flush(); } } } }
if (provider != null) if (provider.supports())