Exemple #1
0
            internal virtual Socket register(Selector selector,
                                             Selector.Direction operations, bool useBlockingOnly)
            {
                if (useBlockingOnly)
                {
                    return(null);
                }

                if (connectedChannel != null)
                {
                    selector.Add(connectedChannel, operations);
                    return(connectedChannel);
                }
                else if (datagramChannel != null)
                {
                    selector.Add(datagramChannel, operations);
                    return(datagramChannel);
                }
                else
                {
                    return(null);
                }
            }
Exemple #2
0
 internal override Socket registerForSelection(Selector selector)
 {
     selector.Add(channel, Selector.Direction.ACCEPT);
     return(channel);
 }
Exemple #3
0
 internal override Socket registerForSelection(Selector selector)
 {
     selector.Add(channel, Selector.Direction.READ);
     return channel;
 }
 internal virtual Socket register(Selector selector, 
     Selector.Direction operations)
 {
     if (connectedChannel != null)
     {
         selector.Add(connectedChannel, operations);
         return connectedChannel;
     }
     else
     {
         selector.Add(datagramChannel, operations);
         return datagramChannel;
     }
 }