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

Add a method to retrieve the remote address #255

Open
lapo-luchini opened this issue May 29, 2018 · 2 comments
Open

Add a method to retrieve the remote address #255

lapo-luchini opened this issue May 29, 2018 · 2 comments
Labels
API (Both) Impacts the client and server API enhancement Adding a new feature or improving an existing one
Milestone

Comments

@lapo-luchini
Copy link

lapo-luchini commented May 29, 2018

AFAICT it is currently impossible (except using reflection to access specific implementation’s private properties) to retrieve the connecting user’s IP address.
Just as in ordinary HTTP connections, it could be useful to know that.
To avoid changing the APIs I guess it could be added to the existing session user properties (as done e.g. by Getty Jetty), but any standard way to obtain that would be useful, really, even adding it to HandshakeRequest and accessing in the way suggested in #218.

@joakime
Copy link
Contributor

joakime commented May 29, 2018

Note: The Jetty project exposes the local and remote InetAdddress (along with other handshake values) in the Session.userProperties as well.

Under the names javax.websocket.endpoint.remoteAddress and javax.websocket.endpoint.localAddress.

@lapo-luchini
Copy link
Author

Uh, yes, I wrote "getty" but I meant "jetty". 😇

@markt-asf markt-asf added API (Both) Impacts the client and server API enhancement Adding a new feature or improving an existing one Jakarta EE 10 labels Apr 16, 2020
@markt-asf markt-asf added this to the backlog milestone May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API (Both) Impacts the client and server API enhancement Adding a new feature or improving an existing one
Projects
None yet
Development

No branches or pull requests

3 participants