/**
* Return the SelectionKey associated with this channel.
*/
public SelectionKey cometKeyFor(SelectableChannel channel){
NioProvider nioP = NioProvider.getProvider();
if (nioP == null) {
return channel.keyFor(selector);
} else {
return nioP.keyFor(channel, selector);
}
}