public int getSendBufferSize() { try { return ch.socket().getSendBufferSize(); } catch (SocketException e) { throw new RuntimeIOException(e); } }
@Override public IoSession getSession() throws RuntimeIOException { Object v = getValue(); if (v instanceof RuntimeIOException) { throw (RuntimeIOException) v; } else if (v instanceof Throwable) { throw (RuntimeIOException) new RuntimeIOException( "Failed to get the session.").initCause((Throwable) v); } else { return (IoSession) v; } }
public void setKeepAlive(boolean on) { try { ch.socket().setKeepAlive(on); } catch (SocketException e) { throw new RuntimeIOException(e); } }
public int getReceiveBufferSize() { try { return ch.socket().getReceiveBufferSize(); } catch (SocketException e) { throw new RuntimeIOException(e); } }
public void setReuseAddress(boolean on) { try { ch.socket().setReuseAddress(on); } catch (SocketException e) { throw new RuntimeIOException(e); } }
public void setTcpNoDelay(boolean on) { try { ch.socket().setTcpNoDelay(on); } catch (SocketException e) { throw new RuntimeIOException(e); } }
public void setSoLinger(int linger) { try { if (linger < 0) { ch.socket().setSoLinger(false, 0); } else { ch.socket().setSoLinger(true, linger); } } catch (SocketException e) { throw new RuntimeIOException(e); } }
public void setOobInline(boolean on) { try { ch.socket().setOOBInline(on); } catch (SocketException e) { throw new RuntimeIOException(e); } }
public boolean isKeepAlive() { try { return ch.socket().getKeepAlive(); } catch (SocketException e) { throw new RuntimeIOException(e); } }
public boolean isOobInline() { try { return ch.socket().getOOBInline(); } catch (SocketException e) { throw new RuntimeIOException(e); } }
public boolean isTcpNoDelay() { try { return ch.socket().getTcpNoDelay(); } catch (SocketException e) { throw new RuntimeIOException(e); } }
public void setReceiveBufferSize(int size) { if (SocketSessionConfigImpl.isSetReceiveBufferSizeAvailable()) { try { ch.socket().setReceiveBufferSize(size); } catch (SocketException e) { throw new RuntimeIOException(e); } } } }
public void setSendBufferSize(int size) { if (SocketSessionConfigImpl.isSetSendBufferSizeAvailable()) { try { ch.socket().setSendBufferSize(size); } catch (SocketException e) { throw new RuntimeIOException(e); } } }
public int getSoLinger() { try { return ch.socket().getSoLinger(); } catch (SocketException e) { throw new RuntimeIOException(e); } }
public boolean isReuseAddress() { try { return ch.socket().getReuseAddress(); } catch (SocketException e) { throw new RuntimeIOException(e); } }
public void setTrafficClass(int tc) { if (SocketSessionConfigImpl.isSetTrafficClassAvailable()) { try { ch.socket().setTrafficClass(tc); } catch (SocketException e) { throw new RuntimeIOException(e); } } }
@Override public boolean isReuseAddress() { try { return ch.socket().getReuseAddress(); } catch (SocketException e) { throw new RuntimeIOException(e); } }
@Override public boolean isBroadcast() { try { return ch.socket().getBroadcast(); } catch (SocketException e) { throw new RuntimeIOException(e); } }
@Override public void setReuseAddress(boolean reuseAddress) { try { ch.socket().setReuseAddress(reuseAddress); } catch (SocketException e) { throw new RuntimeIOException(e); } }
@Override public int getReceiveBufferSize() { try { return ch.socket().getReceiveBufferSize(); } catch (SocketException e) { throw new RuntimeIOException(e); } }