Update localAddress Javadoc in WebSocketSession

Closes gh-34304
This commit is contained in:
rstoyanchev
2025-01-23 15:11:43 +00:00
parent 9b58df8857
commit a6b6d19545

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -73,6 +73,12 @@ public interface WebSocketSession extends Closeable {
/**
* Return the address on which the request was received.
* <p><strong>Note:</strong> The localAddress is not always possible to access,
* which is the case with the Standard WebSocket client. In 6.2.x
* {@link org.springframework.web.socket.client.standard.StandardWebSocketClient}
* returns an address based on the local host and the port of the target
* address (not the same as the local port). In 7.0, the same will return
* {@code null} instead.
*/
@Nullable
InetSocketAddress getLocalAddress();