File tree 1 file changed +7
-1
lines changed
spring-websocket/src/main/java/org/springframework/web/socket
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2022 the original author or authors.
2
+ * Copyright 2002-2025 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -73,6 +73,12 @@ public interface WebSocketSession extends Closeable {
73
73
74
74
/**
75
75
* Return the address on which the request was received.
76
+ * <p><strong>Note:</strong> The localAddress is not always possible to access,
77
+ * which is the case with the Standard WebSocket client. In 6.2.x
78
+ * {@link org.springframework.web.socket.client.standard.StandardWebSocketClient}
79
+ * returns an address based on the local host and the port of the target
80
+ * address (not the same as the local port). In 7.0, the same will return
81
+ * {@code null} instead.
76
82
*/
77
83
@ Nullable
78
84
InetSocketAddress getLocalAddress ();
You can’t perform that action at this time.
0 commit comments