示例#1
0
        public override SelectionKey register(AbstractSelectableChannel ch, Object attachment)
        {
            if (!(ch is SelChImpl))
            {
                throw new IllegalSelectorException();
            }

            SelectionKeyImpl k = new SelectionKeyImpl((SelChImpl)ch, this);

            k.attach(attachment);

            lock (publicKeys)
            {
                implRegister(k);
            }

            return(k);
        }
示例#2
0
 public abstract SelectionKey register(AbstractSelectableChannel ch, Object att);