RFR of 8087304: (ch) java/nio/channels/DatagramChannel/EmptyBuffer.java received 4 times while expected 3
brian.burkhalter at oracle.com
Mon Jun 15 19:40:21 UTC 2015
On Jun 13, 2015, at 11:14 PM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> On 12/06/2015 23:10, Brian Burkhalter wrote:
>> OK, I retried the above approach but did not see how to get it to work. It seemed a conundrum: I could not get the client address needed in the server without first connecting the client to the server which requires knowing the server port.
> It connects to the host address (or whatever address that InetAddress.getLocalHost returns) so if you also bind to the host address then it means you have the host + port before you create the Server thread.
>> So I propose this version instead:
>> In this version the client address is set on the Server instance in the main thread before the server thread is started.
> This version is okay. It relies on the Thread.start but that is okay if you don't want to put any more time into this one.
I think that this version of the patch
might be more what you had in mind. I cleaned up the test a little elsewhere as well.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nio-dev