171172173174175176177178
@Override public boolean isReuseAddress() { try { return javaSocket.getReuseAddress(); } catch (SocketException e) { throw new ChannelException(e); } }
180181182183184185186187
@Override public boolean isTcpNoDelay() { try { return javaSocket.getTcpNoDelay(); } catch (SocketException e) { throw new ChannelException(e); } }
189190191192193194195196197
@Override public SocketChannelConfig setKeepAlive(boolean keepAlive) { try { javaSocket.setKeepAlive(keepAlive); } catch (SocketException e) { throw new ChannelException(e); } return this; }
206207208209210211212213214
@Override public SocketChannelConfig setReceiveBufferSize(int receiveBufferSize) { try { javaSocket.setReceiveBufferSize(receiveBufferSize); } catch (SocketException e) { throw new ChannelException(e); } return this; }
216217218219220221222223224
@Override public SocketChannelConfig setReuseAddress(boolean reuseAddress) { try { javaSocket.setReuseAddress(reuseAddress); } catch (SocketException e) { throw new ChannelException(e); } return this; }
226227228229230231232233234
@Override public SocketChannelConfig setSendBufferSize(int sendBufferSize) { try { javaSocket.setSendBufferSize(sendBufferSize); } catch (SocketException e) { throw new ChannelException(e); } return this; }
240241242243244245246247248
javaSocket.setSoLinger(false, 0); } else { javaSocket.setSoLinger(true, soLinger); } } catch (SocketException e) { throw new ChannelException(e); } return this; }
250251252253254255256257258
@Override public SocketChannelConfig setTcpNoDelay(boolean tcpNoDelay) { try { javaSocket.setTcpNoDelay(tcpNoDelay); } catch (SocketException e) { throw new ChannelException(e); } return this; }
260261262263264265266267268
@Override public SocketChannelConfig setTrafficClass(int trafficClass) { try { javaSocket.setTrafficClass(trafficClass); } catch (SocketException e) { throw new ChannelException(e); } return this; }
311312313314315316317318319320321
} } Channel boundChannel = LocalChannelRegistry.get(remoteAddress); if (!(boundChannel instanceof LocalServerChannel)) { Exception cause = new ChannelException("connection refused"); promise.setFailure(cause); close(voidFuture()); return; }