socket :: SocketSet :: defaultinit
# A simple set of sockets used by `SocketObserver`
class SocketSet
private var native = new NativeSocketSet
init do clear
# Add `socket` to this set
fun add(socket: Socket) do native.set(socket.native)
# Remove `socket` from this set
fun remove(socket: Socket) do native.clear(socket.native)
# Does this set has `socket`?
fun has(socket: Socket): Bool do return native.is_set(socket.native)
# Clear all sockets from this set
fun clear do native.zero
end
lib/socket/socket.nit:290,1--307,3