diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-02-13 01:32:27 +0100 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2018-03-15 12:53:22 +0100 |
commit | 1eb6b01fca598194f59f8f4cac499825e6769363 (patch) | |
tree | af72a46b8c74f044ee03301073c8d12c7d8053d7 /src/node_http2.h | |
parent | 67f1d76956a8a5da9875b113371c8786ad579086 (diff) | |
download | android-node-v8-1eb6b01fca598194f59f8f4cac499825e6769363.tar.gz android-node-v8-1eb6b01fca598194f59f8f4cac499825e6769363.tar.bz2 android-node-v8-1eb6b01fca598194f59f8f4cac499825e6769363.zip |
http2: use native pipe instead of synchronous I/O
This resolves the issue of using synchronous I/O for
`respondWithFile()` and `respondWithFD()`, and enables
scenarios in which the underlying file does not need
to be a regular file.
PR-URL: https://github.com/nodejs/node/pull/18936
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'src/node_http2.h')
-rw-r--r-- | src/node_http2.h | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/node_http2.h b/src/node_http2.h index 2d55989fd7..0fac6cca00 100644 --- a/src/node_http2.h +++ b/src/node_http2.h @@ -580,13 +580,6 @@ class Http2Stream : public AsyncWrap, size_t len, int options); - // Send data read from a file descriptor as the response on this stream. - inline int SubmitFile(int fd, - nghttp2_nv* nva, size_t len, - int64_t offset, - int64_t length, - int options); - // Submit informational headers for this stream inline int SubmitInfo(nghttp2_nv* nva, size_t len); @@ -709,7 +702,6 @@ class Http2Stream : public AsyncWrap, static void PushPromise(const FunctionCallbackInfo<Value>& args); static void RefreshState(const FunctionCallbackInfo<Value>& args); static void Info(const FunctionCallbackInfo<Value>& args); - static void RespondFD(const FunctionCallbackInfo<Value>& args); static void Respond(const FunctionCallbackInfo<Value>& args); static void RstStream(const FunctionCallbackInfo<Value>& args); @@ -753,8 +745,6 @@ class Http2Stream : public AsyncWrap, // waiting to be written out to the socket. std::queue<nghttp2_stream_write> queue_; size_t available_outbound_length_ = 0; - int64_t fd_offset_ = 0; - int64_t fd_length_ = -1; Http2StreamListener stream_listener_; @@ -780,20 +770,6 @@ class Http2Stream::Provider { bool empty_ = false; }; -class Http2Stream::Provider::FD : public Http2Stream::Provider { - public: - FD(int options, int fd); - FD(Http2Stream* stream, int options, int fd); - - static ssize_t OnRead(nghttp2_session* session, - int32_t id, - uint8_t* buf, - size_t length, - uint32_t* flags, - nghttp2_data_source* source, - void* user_data); -}; - class Http2Stream::Provider::Stream : public Http2Stream::Provider { public: Stream(Http2Stream* stream, int options); |