@Override
    public final void setUseClientMode(boolean mode) {
        synchronized (ssl) {
            if (state != STATE_NEW) {
                throw new IllegalArgumentException(
                        "Could not change the mode after the initial handshake has begun.");
            }
        }
        sslParameters.setUseClientMode(mode);
    }
Sets the {@link PrivateKey} to be used for TLS Channel ID by this client socket.

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

@param privateKey private key (enables TLS Channel ID) or {@code null} for no key (disables
       TLS Channel ID). The private key must be an Elliptic Curve (EC) key based on the NIST
       P-256 curve (aka SECG secp256r1 or ANSI X9.62 prime256v1).

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