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); } }
internal override Socket registerForSelection(Selector selector) { selector.Add(channel, Selector.Direction.ACCEPT); return(channel); }
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; } }