/** * Set the value of traffic class * * @param trafficClass the value of traffic class * @return a reference to this, so the API can be used fluently */ public NetworkOptions setTrafficClass(int trafficClass) { Arguments.requireInRange(trafficClass, DEFAULT_TRAFFIC_CLASS, 255, "trafficClass tc must be 0 <= tc <= 255"); this.trafficClass = trafficClass; return this; }
public SocketAddressImpl(int port, String host) { Objects.requireNonNull(host, "no null host accepted"); Arguments.require(!host.isEmpty(), "no empty host accepted"); Arguments.requireInRange(port, 0, 65535, "port p must be in range 0 <= p <= 65535"); this.port = port; this.hostAddress = host; this.path = null; }
@Override public WriteStream<Buffer> sender(int port, String host) { Arguments.requireInRange(port, 0, 65535, "port p must be in range 0 <= p <= 65535"); Objects.requireNonNull(host, "no null host accepted"); return new PacketWriteStreamImpl(this, port, host); }
/** * Set the value of traffic class * * @param trafficClass the value of traffic class * @return a reference to this, so the API can be used fluently */ public NetworkOptions setTrafficClass(int trafficClass) { Arguments.requireInRange(trafficClass, DEFAULT_TRAFFIC_CLASS, 255, "trafficClass tc must be 0 <= tc <= 255"); this.trafficClass = trafficClass; return this; }
public SocketAddressImpl(int port, String host) { Objects.requireNonNull(host, "no null host accepted"); Arguments.require(!host.isEmpty(), "no empty host accepted"); Arguments.requireInRange(port, 0, 65535, "port p must be in range 0 <= p <= 65535"); this.port = port; this.hostAddress = host; this.path = null; }
@Override public WriteStream<Buffer> sender(int port, String host) { Arguments.requireInRange(port, 0, 65535, "port p must be in range 0 <= p <= 65535"); Objects.requireNonNull(host, "no null host accepted"); return new PacketWriteStreamImpl(this, port, host); }