Skip to content

Commit

Permalink
Simplify wording in DatagramSocket::connect
Browse files Browse the repository at this point in the history
  • Loading branch information
dfuch committed Nov 22, 2024
1 parent c9a7336 commit 72b67a8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/java.base/share/classes/java/net/DatagramSocket.java
Original file line number Diff line number Diff line change
Expand Up @@ -387,10 +387,9 @@ public void bind(SocketAddress addr) throws SocketException {
* this socket is unknown - it may or may not be connected to the address
* that it was previously connected to.
*
* <p> When a socket is connected, additional checks are performed
* on a send operation: if the packet's address is set and the packet's address
* and the socket's address do not match, an {@code IllegalArgumentException}
* will be thrown. A socket connected to a multicast address may only
* <p> When the socket is connected, the send method checks that the
* packet's address matches the remote address that the socket is
* connected to. A socket connected to a multicast address may only
* be used to send packets. Datagrams in the socket's {@linkplain
* java.net.StandardSocketOptions#SO_RCVBUF socket receive buffer}, which
* have not been {@linkplain #receive(DatagramPacket) received} before invoking
Expand Down

0 comments on commit 72b67a8

Please sign in to comment.