java socket i/o with callback/non-blocking
- From: "Shane Wealti" <shanewealti@xxxxxxxxx>
- Date: 14 Jun 2005 06:39:47 -0700
I have the O'Reilly Book Java NIO (with the mouse on it) and I'm trying
to figure out how to do non-blocking socket i/o. Basically I want to
have some subroutine to be called whenever there is data available to
read on a socket object without having to poll it. I'm having trouble
understanding how to do this in Java and the NIO book isn't really
helpful in that regard. Right now the way I have my program written is
that I spawn a separate thread that has a while loop that checks the
socket for data and then goes to sleep for a while but that doesn't
seem like a very efficient implementation. I'm having trouble finding
much information on NIO, especially tutorials and code samples that
deal with this.
.
- Follow-Ups:
- Re: java socket i/o with callback/non-blocking
- From: John C. Bollinger
- Re: java socket i/o with callback/non-blocking
- From: iksrazal
- Re: java socket i/o with callback/non-blocking
- From: Bjorn Borud
- Re: java socket i/o with callback/non-blocking
- Prev by Date: Re: Optimise my ray tracer
- Next by Date: Error in dtSearch Component
- Previous by thread: 3-Tier architecure?
- Next by thread: Re: java socket i/o with callback/non-blocking
- Index(es):
Relevant Pages
|