Istream beginner help

ba_f <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.devel
Organization Student TU-Darmstadt
Message-ID <[email protected]>
Hallo Hackers,


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?


// pkg/examples/clntsrv/myClient.cc

static L4::Cap<void> server;

static int func_neg_transmit()
{
   L4::Ipc::Ostream oStream(l4_utcb());

   l4_uint32_t val = 8;

   s << l4_umword_t(Opcode::func_neg) << val;
   int r = l4_error(s.send(server.cap(), Protocol::Calc));
}

static int getResult()
{
   L4::Ipc::Istream iStream(l4_utcb());

   l4_uint32_t val;

//  while ( iStream.has_more<l4_uint32_t>()) { // doesnt work neither
   int r = l4_error(iStream.receive(server.cap()));
   printf("receive success\n"); // doesnt pass here

   iStream >> val;
}

int main()
{
   server = L4Re::Env::env()->get_cap<void>("calc_server");

   func_neg_transmit();
   getResult();

   return 0;
}


THANK YOU
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.