Skip to content

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

Description

@Fr0sT-Brutal
  • 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(); } );

Activity

  1. added
    docIssues and PRs related to Node.js documentation.
    httpIssues and PRs related to the http subsystem.
    on Apr 24, 2017
  2. Trott commented on May 27, 2017

    @Trott
    Member

    @nodejs/documentation

  3. JustinBeckwith commented on Jun 11, 2017

    @JustinBeckwith
    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.

  4. Fr0sT-Brutal commented on Jun 13, 2017

    @Fr0sT-Brutal
    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to Node.js documentation.httpIssues and PRs related to the http subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions