362363364365366367368369370
{ ch.socket().setTrafficClass( trafficClass ); } catch( SocketException e ) { throw new RuntimeIOException( e ); } } }
219220221222223224225226
SocketSessionConfig { public boolean isKeepAlive() { try { return ch.socket().getKeepAlive(); } catch (SocketException e) { throw new RuntimeIOException(e); } }
227228229230231232233234
public void setKeepAlive(boolean on) { try { ch.socket().setKeepAlive(on); } catch (SocketException e) { throw new RuntimeIOException(e); } }
235236237238239240241242
public boolean isOobInline() { try { return ch.socket().getOOBInline(); } catch (SocketException e) { throw new RuntimeIOException(e); } }
243244245246247248249250
public void setOobInline(boolean on) { try { ch.socket().setOOBInline(on); } catch (SocketException e) { throw new RuntimeIOException(e); } }
251252253254255256257258
public boolean isReuseAddress() { try { return ch.socket().getReuseAddress(); } catch (SocketException e) { throw new RuntimeIOException(e); } }
259260261262263264265266
public void setReuseAddress(boolean on) { try { ch.socket().setReuseAddress(on); } catch (SocketException e) { throw new RuntimeIOException(e); } }
267268269270271272273274
public int getSoLinger() { try { return ch.socket().getSoLinger(); } catch (SocketException e) { throw new RuntimeIOException(e); } }
279280281282283284285286
ch.socket().setSoLinger(false, 0); } else { ch.socket().setSoLinger(true, linger); } } catch (SocketException e) { throw new RuntimeIOException(e); } }
4243444546474849
private static Selector newSelector() { try { return Selector.open(); } catch (IOException e) { throw new RuntimeIoException("Failed to open a selector.", e); } }