ch.socket().setReuseAddress(cfg.isReuseAddress());
ch.socket().setBroadcast(cfg.isBroadcast());
ch.socket().setReceiveBufferSize(cfg.getReceiveBufferSize());
ch.socket().setSendBufferSize(cfg.getSendBufferSize());
if (ch.socket().getTrafficClass() != cfg.getTrafficClass()) {
ch.socket().setTrafficClass(cfg.getTrafficClass());
}
if (localAddress != null) {
ch.socket().bind(localAddress);