users@grizzly.java.net

[Q] GrizzletContainer support for starting a Grizzlet on port 0

From: ALT Mobile DEV <dev_at_altmobile.com>
Date: Fri, 4 Jan 2008 06:03:05 -0500

It seems that if you specify port 0, then:


Enumeration<SelectorThread> t_aSelectorEnumeration =
SelectorThread.getSelectors() ;
                        
SelectorThread t_contextSelectorThread ;
                        

while (t_aSelectorEnumeration.hasMoreElements()) {
        t_contextSelectorThread = t_aSelectorEnumeration.nextElement() ;
        System.out.println (t_contextSelectorThread.getPort());
}

will report port 0 and not the OS assigned port. How do I support
specifying port 0?


thanks.


--Zaid

http://altmobile.com