Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Java + WinSock

46 views
Skip to first unread message

Alexis

unread,
Mar 24, 2003, 12:27:49 PM3/24/03
to
Hi,

Does anybody know how does Sun's java virtual machine(for Windows) uses WinSock?
Does it provide option for blocking and non-blocking?
If it does support non-blocking, what ways of handling them does it offer?
Does it use WindowsNT's IO-Completion-Ports or does it offer a similar alternative?

Thanks in advance,
Alexis

SenderX

unread,
Mar 24, 2003, 1:59:10 PM3/24/03
to
> Does anybody know how does Sun's java virtual machine(for Windows) uses
WinSock?
> Does it provide option for blocking and non-blocking?
> If it does support non-blocking, what ways of handling them does it offer?

I don't believe that it handles non-blocking disk or file io for that
matter...

In fact, the SEDA architecture ( which is a decent design ) was written in
java.

http://sourceforge.net/projects/seda/

They use the NBIO library to provide non-blocking io for java.

Why they coded in java, I will never know ;)


Michael Amling

unread,
Mar 24, 2003, 11:02:31 PM3/24/03
to

All releases of Java have blocking I/O available. You find
non-blocking I/O in package java.nio.channels, starting with release
1.4. Java's I/O is blocking or non-blocking on all platforms, not
specific to Windows or to sockets.

--Mike Amling

Tony Swain

unread,
Mar 25, 2003, 4:09:40 AM3/25/03
to
Michael Amling wrote:

NIO may not work as expected under Windoze. I found for example
trying to use non blocking selectors on stdin resulted in...

Exception in thread "main" java.io.IOException: Operation not supported
at sun.nio.ch.IOUtil.configureBlocking(Native Method)
at sun.nio.ch.SourceChannelImpl.implConfigureBlocking(Unknown
Source)
at
java.nio.channels.spi.AbstractSelectableChannel.configureBlocking(Unk
nown Source)
at SystemInPipe.getStdinChannel(SystemInPipe.java:39)
at TestStdin.main(TestStdin.java:15)

So I still can't get my non cannical input on stdin :(

regards...

--
Tony Swain
Senior V.P. of Software Development Hyperbyte inc. http://www.hyperbyte.ab.ca
Netscape DevEdge Champion Devs-Java Newsgroup
snews://secnews.netscape.com/netscape.devs-java

0 new messages