Skip to content

Exposing clients and IP address #634

@mattkrick

Description

@mattkrick

Story

  • As a uWS server, I want to capture the IP address of the connected user for logging. This could be accomplished by e.g. if the return value of behavior.upgrade could get injected into the UpgradeData.

  • As a developer, when I deploy a new version of my server I send a SIGTERM to the old servers. At that time, I would like to gracefully tell each connected client to disconnect over the course of the next 30 seconds so they automatically reconnect to a new server. This requires iterating over a list of all connected clients. Exposing that Map on the return value of makeBehavior would allow me to do that without creating a duplicate object. Alternatively, makeBehavior could accept a clients Map in the options.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions