Google is committed to advancing racial equity for Black communities. See how.

connect method

  • @override

int connect (int flags, int mode, InterfaceRequest request, [int parentFlags = Flags.fsRights]) override

Connect to this vnode. All flags and modes are defined in https://fuchsia.googlesource.com/fuchsia/+/master/zircon/system/fidl/fuchsia-io/io.fidl

By default param #parentFlags is all rights, so that open will allow all rights requested on the incoming request. This param is used by clone to restrict cloning.

Implementation

@override
int connect(int flags, int mode, fidl.InterfaceRequest<Node> request,
    [int parentFlags = Flags.fsRights]) {
  if (_closed) {
    sendErrorEvent(flags, ZX.ERR_NOT_SUPPORTED, request);
    return ZX.ERR_NOT_SUPPORTED;
  }
  var status = _validateFlagsAndMode(flags, mode);
  if (status != ZX.OK) {
    sendErrorEvent(flags, status, request);
    return status;
  }
  _connector(fidl.InterfaceRequest(request.passChannel()));

  return ZX.OK;
}