Set the socket timeout in milliseconds. Values &le; 0 are interpreted as
indefinite timeout which is not recommended!

@param nMilliSecs
The milliseconds timeout
@return {@link EChange}
327299
@Nonnull
  public EChange setTimeoutMilliSecs (final long nMilliSecs)
  {
    if (m_nTimeoutMilliSecs == nMilliSecs)
      return EChange.UNCHANGED;
    m_nTimeoutMilliSecs = nMilliSecs;
    return EChange.CHANGED;
  }
308637
@SuppressWarnings("deprecation")
	private void setLegacySocketTimeout(HttpClient client, int timeout) {
		if (org.apache.http.impl.client.AbstractHttpClient.class.isInstance(client)) {
			client.getParams().setIntParameter(
					org.apache.http.params.CoreConnectionPNames.SO_TIMEOUT, timeout);
		}
	}
867273
@Nonnull
  public CacheControlBuilder setSharedMaxAgeSeconds (@Nonnegative final long nSeconds)
  {
    ValueEnforcer.isGE0 (nSeconds, "Seconds");
    m_aSharedMaxAgeSeconds = Long.valueOf (nSeconds);
    return this;
  }
450313
public StoredCredential setExpirationTimeMilliseconds(Long expirationTimeMilliseconds) {
    lock.lock();
    try {
      this.expirationTimeMilliseconds = expirationTimeMilliseconds;
    } finally {
      lock.unlock();
    }
    return this;
  }
300680
@Override
  public void setTimeout(int timeout) throws SocketException {
    lock.lock();
    try {
      this.socket.setSoTimeout(timeout);
    } finally {
      lock.unlock();
    }
  }
978816
public void setConnectTimeout(int timeout) {
        Assert.isTrue(timeout >= 0, "Timeout must be a non-negative value");
        this.httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(timeout);
    }
644596
@Nonnull
  public static GregorianCalendar getCalendarDefaultTimeZone (final long nMillis)
  {
    final GregorianCalendar aCalendar = new GregorianCalendar (PDTConfig.getDefaultTimeZone (),
                                                               Locale.getDefault (Locale.Category.FORMAT));
    aCalendar.setTimeInMillis (nMillis);
    return aCalendar;
  }
610718
public void setReadTimeout(int readTimeout) {
		this.client = this.client.newBuilder()
				.readTimeout(readTimeout, TimeUnit.MILLISECONDS)
				.build();
	}
1325866
public EpollSocketChannelConfig setTcpKeepIdle(int seconds) {
        try {
            ((EpollSocketChannel) channel).socket.setTcpKeepIdle(seconds);
            return this;
        } catch (IOException e) {
            throw new ChannelException(e);
        }
    }
912693
public void setTimeout(int pTimeout) {
        if (pTimeout < 0) {  // Must be positive
            throw new IllegalArgumentException("Timeout must be positive.");
        }
        timeout = pTimeout;
        if (socket != null) {
            try {
                socket.setSoTimeout(pTimeout);
            }
            catch (SocketException se) {
                // Not much to do about that...
            }
        }
    }
250176
public RiakNode setConnectionTimeout(int connectionTimeoutInMillis)
    {
        stateCheck(State.CREATED, State.RUNNING, State.HEALTH_CHECKING);
        this.connectionTimeout = connectionTimeoutInMillis;
        bootstrap.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, connectionTimeout);
        return this;
    }
939450
public EpollSocketChannelConfig setTcpNotSentLowAt(long tcpNotSentLowAt) {
        try {
            ((EpollSocketChannel) channel).socket.setTcpNotSentLowAt(tcpNotSentLowAt);
            return this;
        } catch (IOException e) {
            throw new ChannelException(e);
        }
    }
1350190
public EpollSocketChannelConfig setTcpKeepCnt(int probes) {
        try {
            ((EpollSocketChannel) channel).socket.setTcpKeepCnt(probes);
            return this;
        } catch (IOException e) {
            throw new ChannelException(e);
        }
    }
611826
public FluoConfiguration setConnectionRetryTimeout(int timeoutMS) {
    Preconditions.checkArgument(timeoutMS >= -1,
        CONNECTION_RETRY_TIMEOUT_MS_PROP + " must be >= -1");
    setProperty(CONNECTION_RETRY_TIMEOUT_MS_PROP, timeoutMS);
    return this;
  }
1357814
public function setTimeout(int $sec, int $mSec = 0): bool
	{
		if ($this->connected() === false)
		{
			throw new \Exception('Not connected');
		}

		return stream_set_timeout($this->connection, $sec, $mSec);
	}
702686
private void set_obj_timeout(final Connection connection, final int millis) {

		// Change Jacorb policy for timeout
		final org.omg.CORBA.Policy p =
			new org.jacorb.orb.policies.RelativeRoundtripTimeoutPolicy(10000 * millis);
		org.omg.CORBA.Object    obj = connection.getObj()._set_policy_override(
                new Policy[] { p }, org.omg.CORBA.SetOverrideType.ADD_OVERRIDE);

        //  Set new instances to connection object
        connection.setObj(obj);
        switch (connection.idl_version) {
            case 5:
                connection.device_5 = Device_5Helper.narrow(obj);
                break;
            case 4:
                connection.device_4 = Device_4Helper.narrow(obj);
                break;
            case 3:
                connection.device_3 = Device_3Helper.narrow(obj);
                break;
            case 2:
                connection.device_2 = Device_2Helper.narrow(obj);
                break;
            default:
                connection.device = DeviceHelper.narrow(obj);
                break;
        }

		// Save new timeout value
		connection.setDev_timeout(millis);
    }
1101420
private void setSocketOptions() throws SocketException {
        if (DISABLE_NAGLES) {
            // Disable Nagle's algorithm (significant on Windows).
            m_socket.setTcpNoDelay(true);
            m_logger.debug("Nagle's algorithm disabled.");
        }
        if (USE_CUSTOM_BUFFER_SIZE) {
            // Improve default send/receive buffer sizes from default (often 8K).
            if (m_socket.getSendBufferSize() < NET_BUFFER_SIZE) {
                m_logger.debug("SendBufferSize increased from {} to {}",
                               m_socket.getSendBufferSize(), NET_BUFFER_SIZE);
                m_socket.setSendBufferSize(NET_BUFFER_SIZE);
            }
            if (m_socket.getReceiveBufferSize() < NET_BUFFER_SIZE) {
                m_logger.debug("ReceiveBufferSize increased from {} to {}",
                               m_socket.getReceiveBufferSize(), NET_BUFFER_SIZE);
                m_socket.setReceiveBufferSize(NET_BUFFER_SIZE);
            }
        }
    }