Newsgroups: comp.parallel.pvm
From: "Vincent" <vturgis@sera-cd.com>
Subject: Messages
Organization: Sera
Date: Wed, 18 Mar 1998 19:24:10 +0100
Message-ID: <6ep3mj$686$1@news4.isdnet.net>


Hi

    Is there a way to read only the last message arrived (and flush the
file).

    For instance, a task receive a continous flow of the same data with a
specific tag and is only interested
in the last message. Doing a while pvm_recv will block the system because
the sender task send as much messages
as it can.

it can be done with socket with a code like that :

 ioctlsocket(sock,FIONREAD,&size);
 UnusedSize=size-sizeof(MyStruct);
 buf=malloc(UnusedSize);
 recv(sock,buf,UnusedSize,0);
 recv(sock,(char *)&MyStruct,sizeof(MyStruct),0);
 free (buf);

but with Pvm ?

    Any ideas ?

    Vincent



--
Vincent Turgis    vturgis@sera-cd.com
Société d'Etudes et réalisations automobiles  http://www.sera-cd.com




