mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8319417: (dc) DatagramChannel.connect undocumented behavior
Reviewed-by: alanb
This commit is contained in:
parent
abf2e49097
commit
a2c5f1fc91
2 changed files with 19 additions and 0 deletions
|
@ -604,6 +604,12 @@ public class DatagramSocket implements java.io.Closeable {
|
|||
|
||||
/**
|
||||
* Returns the address of the endpoint this socket is bound to.
|
||||
* <p>If the socket was initially bound to the wildcard address and
|
||||
* is now {@link #isConnected connected}, then the address returned
|
||||
* may be the local address selected as the source address for
|
||||
* datagrams sent on this socket instead of the wildcard address.
|
||||
* When {@link #disconnect()} is called, the bound address reverts
|
||||
* to the wildcard address.
|
||||
*
|
||||
* @return a {@code SocketAddress} representing the local endpoint of this
|
||||
* socket, or {@code null} if it is closed or not bound yet.
|
||||
|
@ -714,6 +720,12 @@ public class DatagramSocket implements java.io.Closeable {
|
|||
|
||||
/**
|
||||
* Gets the local address to which the socket is bound.
|
||||
* <p>If the socket was initially bound to the wildcard address and
|
||||
* is now {@link #isConnected connected}, then the address returned
|
||||
* may be the local address selected as the source address for
|
||||
* datagrams sent on the socket instead of the wildcard address.
|
||||
* When {@link #disconnect()} is called, the bound address reverts
|
||||
* to the wildcard address.
|
||||
*
|
||||
* <p>If there is a security manager, its
|
||||
* {@code checkConnect} method is first called
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue