Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

quic: implement sendFD() support #150

Closed
wants to merge 7 commits into from
Closed

quic: implement sendFD() support #150

wants to merge 7 commits into from

Commits on Oct 9, 2019

  1. fs: introduce opendir() and fs.Dir

    This adds long-requested methods for asynchronously interacting and
    iterating through directory entries by using `uv_fs_opendir`,
    `uv_fs_readdir`, and `uv_fs_closedir`.
    
    `fs.opendir()` and friends return an `fs.Dir`, which contains methods
    for doing reads and cleanup. `fs.Dir` also has the async iterator
    symbol exposed.
    
    The `read()` method and friends only return `fs.Dirent`s for this API.
    Having a entry type or doing a `stat` call is deemed to be necessary in
    the majority of cases, so just returning dirents seems like the logical
    choice for a new api.
    
    Reading when there are no more entries returns `null` instead of a
    dirent. However the async iterator hides that (and does automatic
    cleanup).
    
    The code lives in separate files from the rest of fs, this is done
    partially to prevent over-pollution of those (already very large)
    files, but also in the case of js allows loading into `fsPromises`.
    
    Due to async_hooks, this introduces a new handle type of `DIRHANDLE`.
    
    This PR does not attempt to make complete optimization of
    this feature. Notable future improvements include:
    - Moving promise work into C++ land like FileHandle.
    - Possibly adding `readv()` to do multi-entry directory reads.
    - Aliasing `fs.readdir` to `fs.scandir` and doing a deprecation.
    
    Refs: nodejs/node-v0.x-archive#388
    Refs: nodejs/node#583
    Refs: libuv/libuv#2057
    
    PR-URL: nodejs/node#29349
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: David Carlier <devnexen@gmail.com>
    Fishrock123 authored and addaleax committed Oct 9, 2019
    Configuration menu
    Copy the full SHA
    91561d0 View commit details
    Browse the repository at this point in the history
  2. http2: allow passing FileHandle to respondWithFD

    This seems to make sense if we want to promote the use
    of `fs.promises`, although it’s not strictly necessary.
    
    PR-URL: nodejs/node#29876
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    addaleax committed Oct 9, 2019
    Configuration menu
    Copy the full SHA
    5e95adb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    04697a3 View commit details
    Browse the repository at this point in the history
  4. quic: implement sendFD() support

    Fixes: #75
    addaleax committed Oct 9, 2019
    Configuration menu
    Copy the full SHA
    3a68f29 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    446b1e4 View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2019

  1. fixup! quic: implement sendFD() support

    Co-Authored-By: James M Snell <jasnell@gmail.com>
    addaleax and jasnell authored Oct 10, 2019
    Configuration menu
    Copy the full SHA
    ba8b7f6 View commit details
    Browse the repository at this point in the history
  2. fixup! quic: implement sendFD() support

    Co-Authored-By: James M Snell <jasnell@gmail.com>
    addaleax and jasnell authored Oct 10, 2019
    Configuration menu
    Copy the full SHA
    49f051a View commit details
    Browse the repository at this point in the history