harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paulex Yang <paulex.y...@gmail.com>
Subject Re: [classlib][nio][discussion] Implementation of java.nio.channels.spi.SelectorProvider.inheritedChannel()
Date Thu, 13 Jul 2006 06:19:25 GMT
Andrew Zhang wrote:
> Hello everybody,
> I plan to implement 
> java.nio.channels.spi.SelectorProvider.inheritedChannel()
> method. Currently Harmony simply returns null.
> Spec doesn not specify how to detect inheritedChannel clearly, 
> "Returns the
> channel inherited from the entity that created this Java virtual 
> machine."
> "For example, on UNIX systems, the Internet services daemon (*inetd*) is
> used to start programs to service requests when a request arrives on an
> associated network port. In this example, the process that is started,
> inherits a channel representing a network socket. "
> As my understanding, what inherited channel does is redirect socket to
> standard input. Therefore, my solution looks like following:
Don't need to check the stdout? IIRC inetd redirects both.
> 1. get standard input file descriptor
> 2. assert the file descriptor. If it is a socket type descriptor, then
> returns a channel which wraps the descriptor.
> I also wrote some samples for ensuring my understanding. It seems OK on
> linux, but not the case on Window. RI always returns null on Windows 
> (maybe
> because there is no service daemon program on Windows? or my 
> understanding
> is totally wrong?) 
Any chance to get non-null value if inetd is dummied on Windows? Seems 
some Services for UNIX(SFU) is provided by MS with Windows server 2003, 
which can mimic the inetd behavior[1]. I'm not sure if it applies to 
WinXP, too.


> Therefore, I want to hear suggestions from our community,
> espeically folks experienced in network!
> Many thanks in advance!
> Best regards,

Paulex Yang
China Software Development Lab

Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org

View raw message