harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ray Chen (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-6493) [classlib][nio]DatagramChannel should be "bounded" after calling the sendto
Date Tue, 06 Apr 2010 02:28:27 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-6493?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ray Chen updated HARMONY-6493:
------------------------------

    Attachment: Harmony6493.diff

The patch contains the fix and a regression test.

The fix is quite simple, just makred the bound status to "true" after calling the sendto function.
The reason for doing that is because that "With a UDP socket, the first time the process calls
sendto, if the socket has not yet had a local port bound to it, that is when an ephemeral
port is chosen by the kernel for the socket. "
And the testcase will show the difference.

However, there are another issue need to be disscussed:  
At first, I used
"InetSocketAddress addr = new InetSocketAddress("localhost",0);"
to let the OS to pick up a free port  number, but the server can not receive the client's
message in that way.
So I change the port number to a fixed number, everything works well.
Anyone have any idea about this? Any sugguestions are welcome!
 

> [classlib][nio]DatagramChannel should be "bounded" after calling the sendto
> ---------------------------------------------------------------------------
>
>                 Key: HARMONY-6493
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6493
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Ray Chen
>         Attachments: Harmony6493.diff
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message