Article View: comp.lang.java
Article #551Re: UNIX like select() for Java!
From: Eric Hodges
Date: Wed, 17 Dec 1997 00:00
Date: Wed, 17 Dec 1997 00:00
20 lines
2150 bytes
2150 bytes
Mark Frazier wrote: > > > The xware.net.Selector class provides an event-driven mechanism for > > handling input from > > multiple sockets. It is ideal for writing server like Java applets or > > applications. It can be used > > on both the client or server side of your sockets based interface. > > Thanks for this. > > However, isn't more "java like" to take the approach of > running every socket in a new thread? I've done this in > Java servers. You start up a Java server socket, and everytime > you get a connection, you run a new thread which is a class > that serves only that socket. The code is pretty trivial. Yeah, I'm not sure why anyone would want to go back to select(). That always seemed like a hack to deal with asynchronous notification in a single threaded environment.
Technical Details
Message-ID:
<34985E4D.539C@telecheck.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<34973C27.759E1BA4@bellatlantic.net> <34984761.369C83CC@rmi.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10a146,aee69011bb9ffa08 X-Google-Attributes: gid10a146,public X-Google-Thread: 111d6b,aee69011bb9ffa08 X-Google-Attributes: gid111d6b,public X-Google-Thread: 1291f0,aee69011bb9ffa08 X-Google-Attributes: gid1291f0,public X-Google-Thread: 1089d0,aee69011bb9ffa08 X-Google-Attributes: gid1089d0,public X-Google-Thread: f5d71,aee69011bb9ffa08 X-Google-Attributes: gidf5d71,public X-Google-Thread: 112e38,aee69011bb9ffa08 X-Google-Attributes: gid112e38,public X-Google-Thread: 107d55,aee69011bb9ffa08 X-Google-Attributes: gid107d55,public X-Google-Thread: f4bc9,aee69011bb9ffa08 X-Google-Attributes: gidf4bc9,public From: Eric Hodges <Eric.Hodges@telecheck.com> Subject: Re: UNIX like select() for Java! Date: 1997/12/17 Message-ID: <34985E4D.539C@telecheck.com> X-Deja-AN: 299162213 Content-Transfer-Encoding: 7bit References: <34973C27.759E1BA4@bellatlantic.net> <34984761.369C83CC@rmi.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Support Request Newsgroups: comp.lang.java,comp.lang.java.misc,comp.lang.java.programmer,comp.lang.java.tech,borland.public.jbuilder.thirdpartytools,borland.public.jbuilder.java.api,symantec.support.devtools.pc.visual-cafe-pro.using,symantec.support.devtools.windows.vcafe4java.Other