[Info-vax] Network mailbox

Snowshoe no at spam.please
Fri Oct 28 02:02:47 EDT 2011


I have my network mailbox silliness working -- sort of. The problem I 
have is that RMS doesn't deliver the messages one at a time, it sort of 
saves them up and then unleashes them all at once. I implemented this as 
a process that reads a (local) mailbox and writes what's there to a 
remote mailbox over a DECnet link.  I also do the reverse (different 
mailbox pair) and have the same problem - a $GET doesn't do anything 
until there are a bunch of messages.  This happens even though the 
remote FAL process reads the messages one at a time, immediately.  It is 
the local RMS or DECnet at fault.

How to tell RMS to give me the messages one at a time?  RAB$M_TMO seems 
to be ignored.

   mbx2_fab = cc$rms_fab;
   mbx2_fab.fab$l_fop = FAB$M_SQO;
   mbx2_fab.fab$b_fac = FAB$M_PUT;
   mbx2_fab.fab$b_org = FAB$C_SEQ;
   mbx2_fab.fab$b_rat = FAB$M_CR;
   mbx2_fab.fab$b_rfm = FAB$C_RFM_DFLT;
   mbx2_fab.fab$l_fna = "REMOTE::MBA1234:";
   mbx2_fab.fab$b_fns = 16;
   mbx2_fab.fab$w_mrs = 5000;

   status = SYS$OPEN(&mbx2_fab);
   if (!(status & 1)) lib$signal(status);

   mbx2_rab = cc$rms_rab;
   mbx2_rab.rab$l_rop = RAB$M_TMO;
   mbx2_rab.rab$b_tmo = 0;
   mbx2_rab.rab$l_rbf = rec_buffer2;
   mbx2_rab.rab$l_fab = &mbx2_fab;

   status = SYS$CONNECT (&mbx2_rab);
   if (!(status & 1)) lib$signal(status);

...

void mbx2_ast(void) {
   int status;
   int len;
   char zzz[5000];  //debug

// status from last mbx read

   status = mbx2_iosb.status;
   if (!(status & 1)) lib$signal(status);

// debug

   len = mbx2_iosb.byte_cnt;
   memcpy(zzz,rec_buffer2,len);
   zzz[len] = '\0';
   printf (">>> size = %d |%s|\n",len,zzz);

// end debug

   mbx2_rab.rab$w_rsz = mbx2_iosb.byte_cnt;
   status = SYS$PUT(&mbx2_rab);		// write to remote mailbox
   if (!(status & 1)) lib$signal(status);

// queue next read

   status = sys$qio (1, mbx_chan2, IO$_READVBLK, &mbx2_iosb, mbx2_ast, 0,
                     rec_buffer2, sizeof(rec_buffer2), 0, 0, 0, 0 );
   if (!(status & 1)) lib$signal(status);
}




More information about the Info-vax mailing list