@Override
    public final void setChannelIdEnabled(boolean enabled) {
        if (getUseClientMode()) {
            throw new IllegalStateException("Client mode");
        }

        synchronized (ssl) {
            if (state != STATE_NEW) {
                throw new IllegalStateException(
                        "Could not enable/disable Channel ID after the initial handshake has"
                                + " begun.");
            }
        }
        sslParameters.channelIdEnabled = enabled;
    }
Enables/disables TLS Channel ID for this server socket.

<p>This method needs to be invoked before the handshake starts.

@throws IllegalStateException if this is a client socket or if the handshake has already
        started.
common/src/main/java/org/conscrypt/ConscryptFileDescriptorSocket.java