Re: Istream beginner help

Adam Lackorzynski <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.devel
Message-ID <[email protected]>
On Thu Jun 12, 2014 at 21:56:05 +0200, ba_f wrote:
> for design reason i would like to use separate Istream & Ostream instead of
> IOstream with call().
> 
> ostream.send() does work, but i cant manage istream.receive(). It keeps
> waiting for ever.
> 
> I did edit the client from pkg/examples/clntsrv, the server sends the
> result, so there should be something to receive.
> What am i missing?

The problem is twofold. First, the server replies immediately with a
zero timeout, thus it is likely that the client is not yet receiving and
the reply is lost. Further, the server does not know the client, thus it
can only reply to the preceding receive. For that reason the client
needs to do a 'call' which atomically transfers the client from sending
to receiving and the send from the server can be transferred to the
client.



Adam
-- 
Adam                 [email protected]
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.