public long attachChannel(SocketChannel sc, boolean watch_mode) {
    long b = createBinding();

    EventableSocketChannel ec = new EventableSocketChannel(sc, b, mySelector);

    ec.setAttached();
    if (watch_mode) ec.setWatchOnly();

    Connections.put(b, ec);
    NewConnections.add(b);

    return b;
  }