Browse Source

Update localAddress Javadoc in WebSocketSession

Closes gh-34304
pull/34362/head
rstoyanchev 1 year ago
parent
commit
a6b6d19545
  1. 8
      spring-websocket/src/main/java/org/springframework/web/socket/WebSocketSession.java

8
spring-websocket/src/main/java/org/springframework/web/socket/WebSocketSession.java

@ -1,5 +1,5 @@ @@ -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 { @@ -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();

Loading…
Cancel
Save