Re: Double streams



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
.



Relevant Pages

  • Re: file transfer with sockets
    ... confirmation from client for each chunk before sending the next? ... to server, server interprets command, executes it, then simply returns ... files (hence the reading in chunks). ... sending the bytes over the stream. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: A Media Distribution Problem
    ... > A supplier wishes to sell his goods by realtime downloading ... One way to solve this is to lock each login to a MAC address at the server ... You have a MPEG stream being sent to the main distribution server. ... At the client end, each piece of software has a unique RSA private key. ...
    (sci.crypt)
  • Re: How do I stop a Winsock from buffering characters?
    ... There server is like this: ... Stream s = client.GetStream; ... The fist character does not show up the rest do ... first character of the client send. ...
    (microsoft.public.windowsce.embedded)
  • Re: How do I stop a Winsock from buffering characters?
    ... it's applied at the OS level to the socket. ... Stream s = client.GetStream; ... from the client code and have the server see it right away. ... first character of the client send. ...
    (microsoft.public.windowsce.embedded)
  • Re: How do I stop a Winsock from buffering characters?
    ... The client is just doing this to send: ... Stream s = client.GetStream; ... I just wan to send one character ... from the client code and have the server see it right away. ...
    (microsoft.public.windowsce.embedded)