Re: Double streams
- From: "Carsten H. Pedersen" <no@xxxxxxx>
- Date: Wed, 15 Feb 2006 16:48:05 +0100
Oliver Wong wrote:
Yeah... i tried to replicate my problem on a smaller scale. I'm fiddling with RMI. So two clients, each of whom has the Foo* Streams, and inside these there is a Remote interface, which can call read() and write(), respectively, on an object on the server. This object being a stream, which extends PipedOutputStream (or PipedInputStream), and the two clients communicate with eachother with the server (and the pipes) as a proxy.
How many threads does each client have, and what does each thread do?
- Oliver
Each client only has one thread. Client A writes data to its FooOutputStream, which writes to its associated PipedOutputStream on the server. Client B reads data from its FooInputStream, which reads from its associated PipedInputStream (which is connected to the PipiedOutputStream associated with client A) on the server. It then blocks before data is returned from FooInputStream to client B.
If i close the output stream it returns - which means that it's closing the output stream on the server, since calling close on the FooOutputStream just sends to the call to the PipedOutputStream on the server.
/Carsten
.
- Follow-Ups:
- Re: Double streams
- From: Oliver Wong
- Re: Double streams
- References:
- Double streams
- From: Carsten H. Pedersen
- Re: Double streams
- From: Oliver Wong
- Re: Double streams
- From: Carsten H. Pedersen
- Re: Double streams
- From: Oliver Wong
- Re: Double streams
- From: Carsten H. Pedersen
- Re: Double streams
- From: Oliver Wong
- Double streams
- Prev by Date: Re: Double streams
- Next by Date: Must avoid regions outside image boundaries
- Previous by thread: Re: Double streams
- Next by thread: Re: Double streams
- Index(es):
Relevant Pages
|
|