设置 Socket 的 Option 选项<br>
选项见：{@link java.net.StandardSocketOptions}

@param <T> 选项泛型
@param name {@link SocketOption} 枚举
@param value SocketOption参数
@throws IOException IO异常
776275
public <T> AioServer setOption(SocketOption<T> name, T value) throws IOException {
		this.channel.setOption(name, value);
		return this;
	}
485609
public <T> void put(Option<T> key, T value) {
        this.values.put(key, value);
    }
106956
public function setOption($name, $value) {
    if (!array_key_exists($name, $this->options)) {
      throw new InvalidArgumentException(sprintf('Undefined option: "%s"', $name));
    }

    $this->options[$name] = $value;
    $this->getHttpClient()->setOption($name, $value);
  }
120731
@Override
	public void setOption(String name, boolean value) throws IOException {
		setOption(name, Boolean.toString(value));
	}
952670
public SocketBinding socketBinding(String name) {
        return this.socketBindings.stream().filter(e -> e.name().equals(name)).findFirst().orElse(null);
    }
356749
public Option getOption(String name) {
        if (shortOpts.containsKey(name)) {
            return shortOpts.get(name);
        }
        return longOpts.get(name);
    }
295152
public JSONObject putOpt(String name, Object value) throws JSONException {
		if (name == null || value == null) {
			return this;
		}
		return put(name, value);
	}
433770
public final <T> void addOption(String name, String description)
    {
        addOption(String.class, name, description, null);
    }
356308
public String option (
        String name, String value, String item, Object defaultValue)
    {
        String selectedValue = getValue(name, defaultValue);
        return fixedOption(name, value, item, selectedValue);
    }
351574
@Override
  public boolean accept(SocketBar socket)
    throws IOException
  {
    JniSocketImpl jniSocket = (JniSocketImpl) socket;

    if (_fd == 0)
      throw new IOException("accept from closed socket");

    return jniSocket.accept(this, _fd, _socketTimeout);
  }
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);
            }
        }
    }
354608
@Override
	public synchronized void setOption(String name, String value) throws IOException {
		// update the property
		Properties props = getProps();
		if (value == null) {
			props.remove(name);
		} else {
			props.setProperty(name, value);
		}
		setProps(props);
		// Persist the new properties
		saveProps(props);

		long seq = SequenceNumberProvider.incrementAndGetSequenceNumber();
		// Notify update listeners
		updateNotify(seq);
		// Notify options instances using the same properties file
		propsFileUpdateNotify(props, seq);

	}
336520
public void setInt(String name, int value) throws UnsupportedEncodingException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setInt", Integer.valueOf(value));
    getBodyMap().put(name, Integer.valueOf(value));
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "setInt");
  }
488521
public void appendOptionalAttribute(final String name, final Object value) {
		if (value != null) {
			appendAttribute(name, value);
		}
	}
1303550
@SuppressWarnings("unchecked")
    public <T> T getOptionValue(String name)
    {
        return (T) configurationOptions.get(name);
    }
82076
public <T> GrpcServerBuilder withChildOption(ChannelOption<T> option, T value) {
    mNettyServerBuilder = mNettyServerBuilder.withChildOption(option, value);
    return this;
  }
735660
public void setParameter(String name, String value) {
		String escapedValue = RFC2396UrlDecoder.encode(value);
		super.setParameter(name, value);
		try {
		    // https://code.google.com/p/sipservlets/issues/detail?id=170
			telUrl.setParameter(name, "".equals(escapedValue) ? null : escapedValue);
		} catch (ParseException e) {
			throw new IllegalArgumentException("Problem setting parameter", e);
		}
	}