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

Ability to intercept requests and access channel information such as remote address #735

Closed
NizGh opened this issue Jan 16, 2020 · 1 comment · Fixed by #929
Closed

Ability to intercept requests and access channel information such as remote address #735

NizGh opened this issue Jan 16, 2020 · 1 comment · Fixed by #929
Assignees
Projects
Milestone

Comments

@NizGh
Copy link

NizGh commented Jan 16, 2020

As in webflux we can retrieve the remote address from serverWebExchange.getRequest().getRemoteAddress(), what are alternatives to extract connection/channel information in rsocket?

@linux-china
Copy link
Contributor

linux-china commented Jan 17, 2020

Now you can get the remote address by tricky way.

  • TcpDuplexConnection and WebsocketDuplexConnection have a connection attribute with reactor.netty.Connection type, and you can use connection.channel().remoteAddress() to get remote address
  • Write a DuplexConnectionInterceptor plugin on server to intercept DuplexConnection, if duplexConnection is instance of WebsocketDuplexConnection or TcpDuplexConnection, and you can get Netty connection attribute.

@rstoyanchev rstoyanchev added this to the 1.x Backlog milestone Apr 28, 2020
@rstoyanchev rstoyanchev added this to To do in Core Apr 28, 2020
@OlegDokuka OlegDokuka modified the milestones: 1.x Backlog, 1.1 M2 Aug 12, 2020
rstoyanchev added a commit to rstoyanchev/rsocket-java that referenced this issue Sep 10, 2020
Closes rsocketgh-735

Signed-off-by: Rossen Stoyanchev <rstoyanchev@vmware.com>
@rstoyanchev rstoyanchev linked a pull request Sep 10, 2020 that will close this issue
rstoyanchev added a commit to rstoyanchev/rsocket-java that referenced this issue Sep 10, 2020
Closes rsocketgh-735

Signed-off-by: Rossen Stoyanchev <rstoyanchev@vmware.com>
rstoyanchev added a commit that referenced this issue Sep 10, 2020
Closes gh-735

Signed-off-by: Rossen Stoyanchev <rstoyanchev@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Core
  
To do
Development

Successfully merging a pull request may close this issue.

4 participants