-
Notifications
You must be signed in to change notification settings - Fork 354
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
Expose remote address via DuplexConnection #929
Conversation
rsocket-core/src/test/java/io/rsocket/test/util/LocalSocketAddress.java
Outdated
Show resolved
Hide resolved
* Return the remote address that this connection is connected to. The returned {@link | ||
* SocketAddress} varies by transport type and should be downcast to obtain more detailed | ||
* information. For TCP and WebSocket, the address type is {@link java.net.InetSocketAddress}. For | ||
* local transport, it is {@link io.rsocket.transport.local.LocalSocketAddress}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we clarify here that it is null for disconnected connections? Do we want to mark as @nullable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for a disconnected connection, the channel still returns an address. My understanding is it can return null
before it is connected but DuplexConnection
is typically created after the connection is established.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup. I think soo. I guess once the connection is resolved, the address should be available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Closes rsocketgh-735 Signed-off-by: Rossen Stoyanchev <[email protected]>
0002d67
to
2d0efed
Compare
Pull request for #735 and #743.