On Tue, 28 Nov 2023 12:31:22 GMT, Michael McMahon <[email protected]> wrote:

>> Hi,
>> 
>> This is a small doc change for DatagramChannel.getLocalAddress() and the 
>> equivalent methods on DatagramSocket which documents some existing (but not 
>> currently documented) behavior.
>> 
>> Thanks,
>> Michael
>
> Michael McMahon has updated the pull request with a new target base due to a 
> merge or a rebase. The incremental webrev excludes the unrelated changes 
> brought in by the merge/rebase. The pull request contains eight additional 
> commits since the last revision:
> 
>  - removed stray period
>  - Merge branch 'master' into 8319417-datagram
>  - Alan round 2
>  - Alan review
>  - Merge branch 'master' into 8319417-datagram
>  - update
>  - update 1
>  - spec update

The current wording says that:
"If the channel's 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 via this channel instead of the wildcard address."

The may is a bit ambiguous ... is this OS dependent or is it universal that for 
a connected DatagramSocket or DatagramChannel then the local address of the 
intreface for which the send was routed will be returned. If it is OS 
dependent, should that be stated, also ?

Also, the return for the case of an unbound DatagramSocket or DatagramChannel 
is not specified.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/16635#issuecomment-1829859589

Reply via email to