ch.socket().setBroadcast( cfg.isBroadcast() );
ch.socket().setReceiveBufferSize( cfg.getReceiveBufferSize() );
ch.socket().setSendBufferSize( cfg.getSendBufferSize() );
ch.socket().setTrafficClass( cfg.getTrafficClass() );
ch.configureBlocking( false );
ch.socket().bind( req.address );
ch.register( selector, SelectionKey.OP_READ, req );
synchronized( channels )
{
channels.put( req.address, ch );