driver-legacy/src/main/com/mongodb/MongoClientOptions.java
@Deprecated
    public SocketFactory getSocketFactory() {
        if (socketFactory != null) {
            return socketFactory;
        } else if (getSslSettings().isEnabled()) {
            return sslContext == null ? DEFAULT_SSL_SOCKET_FACTORY : sslContext.getSocketFactory();
        } else {
            return DEFAULT_SOCKET_FACTORY;
        }
    }
@Deprecated
    public SocketFactory getSocketFactory() {
        if (socketFactory != null) {
            return socketFactory;
        } else if (getSslSettings().isEnabled()) {
            return sslContext == null ? DEFAULT_SSL_SOCKET_FACTORY : sslContext.getSocketFactory();
        } else {
            return DEFAULT_SOCKET_FACTORY;
        }
    }
<p>The socket factory for creating sockets to the mongo server.</p>

<p>Default is SocketFactory.getDefault()</p>

@return the socket factory
@deprecated Prefer {@link #isSslEnabled()} and {@link #getSslContext()}