Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: minor refactoring to StreamBase #17564

Closed
wants to merge 4 commits into from

Commits on Dec 9, 2017

  1. src: remove StreamResourc::Cast()

    This is not necessary since C++ already has `static_cast`
    as a proper way to cast inside a class hierarchy.
    addaleax committed Dec 9, 2017
    Configuration menu
    Copy the full SHA
    3e88eba View commit details
    Browse the repository at this point in the history
  2. src: minor refactoring to StreamBase writes

    Instead of having per-request callbacks, always call a callback
    on the `StreamBase` instance itself for `WriteWrap` and `ShutdownWrap`.
    
    This makes `WriteWrap` cleanup consistent for all stream classes,
    since the after-write callback is always the same now.
    
    If special handling is needed for writes that happen to a sub-class,
    `AfterWrite` can be overridden by that class, rather than that
    class providing its own callback (e.g. updating the write
    queue size for libuv streams).
    
    If special handling is needed for writes that happen on another
    stream instance, the existing `after_write_cb()` callback
    is used for that (e.g. custom code after writing to the
    transport from a TLS stream).
    
    As a nice bonus, this also makes `WriteWrap` and `ShutdownWrap`
    instances slightly smaller.
    addaleax committed Dec 9, 2017
    Configuration menu
    Copy the full SHA
    cf96acc View commit details
    Browse the repository at this point in the history
  3. [squash] make CI happy

    addaleax committed Dec 9, 2017
    Configuration menu
    Copy the full SHA
    2c08345 View commit details
    Browse the repository at this point in the history
  4. test: expand test-https-keep-alive-large-write

    Check that `serverConnectionHandle.writeQueueSize === 0`
    after a large write finished.
    addaleax committed Dec 9, 2017
    Configuration menu
    Copy the full SHA
    0f28644 View commit details
    Browse the repository at this point in the history