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

Docs: http.ServerResponse is missing socket and connection fields #12617

Closed
Fr0sT-Brutal opened this issue Apr 24, 2017 · 3 comments
Closed

Docs: http.ServerResponse is missing socket and connection fields #12617

Fr0sT-Brutal opened this issue Apr 24, 2017 · 3 comments
Labels
doc Issues and PRs related to the documentations. http Issues or PRs related to the http subsystem.

Comments

@Fr0sT-Brutal
Copy link

  • Version: v7.9.0
  • Subsystem: http

http.ServerResponse docs are missing socket and connection fields. Moreover, it should be mentioned that they're nulled after end() so this won't work: resp.end(message, function(){ this.socket.destroy(); } );

@vsemozhetbyt vsemozhetbyt added doc Issues and PRs related to the documentations. http Issues or PRs related to the http subsystem. labels Apr 24, 2017
@Trott
Copy link
Member

Trott commented May 27, 2017

@nodejs/documentation

@JustinBeckwith
Copy link
Contributor

Out of curiosity - may I ask what you're trying to do with the socket you get back here? I'm trying to think of cases where using the writableStream methods on the response isn't the right thing to use.

@Fr0sT-Brutal
Copy link
Author

In my case I'm dealing with streaming server that receives one request and then streams data while the connection exists. I keep Response object to write to and I don't need Request object at all. But I still need socket for closing the connection.

JustinBeckwith added a commit to JustinBeckwith/node that referenced this issue Jun 19, 2017
Adds documentation and samples for the `connection` and
`socket` properties available on the `http.serverResponse`
and `http.clientRequest` objects.

Fixes: nodejs#12617
silverwind pushed a commit that referenced this issue Jun 19, 2017
Adds documentation and samples for the `connection` and
`socket` properties available on the `http.serverResponse`
and `http.clientRequest` objects.

PR-URL: #13617
Fixes: #12617
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
addaleax pushed a commit that referenced this issue Jun 24, 2017
Adds documentation and samples for the `connection` and
`socket` properties available on the `http.serverResponse`
and `http.clientRequest` objects.

PR-URL: #13617
Fixes: #12617
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
addaleax pushed a commit that referenced this issue Jun 29, 2017
Adds documentation and samples for the `connection` and
`socket` properties available on the `http.serverResponse`
and `http.clientRequest` objects.

PR-URL: #13617
Fixes: #12617
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
addaleax pushed a commit that referenced this issue Jul 11, 2017
Adds documentation and samples for the `connection` and
`socket` properties available on the `http.serverResponse`
and `http.clientRequest` objects.

PR-URL: #13617
Fixes: #12617
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
addaleax pushed a commit that referenced this issue Jul 18, 2017
Adds documentation and samples for the `connection` and
`socket` properties available on the `http.serverResponse`
and `http.clientRequest` objects.

PR-URL: #13617
Fixes: #12617
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. http Issues or PRs related to the http subsystem.
Projects
None yet
Development

No branches or pull requests

4 participants