HP3000-L Archives

July 1995, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jeff Kell <[log in to unmask]>
Reply To:
Jeff Kell <[log in to unmask]>
Date:
Thu, 6 Jul 1995 14:10:01 EDT
Content-Type:
text/plain
Parts/Attachments:
text/plain (31 lines)
On Thu, 6 Jul 1995 09:37:00 PDT Dan said:
>Is there any way to _ensure_ the data has been sent and to the remote end
>and ACK'd before the connection is released? Graceful shutdown of sockets
>doesn't seem to work -- data still gets dropped (but no error is reported).
 
You do a graceful shutdown, then read from the socket until you get an
error, then do a "shutdown dammit".  If I recall correctly, well, what
the heck, let me go find that code snippet..... here ya go:
 
close_vsocket(void)
{
int i,flags;
 
   IPCSHUTDOWN(virt_desc,&graceful,NULL,&ipcerror);
   /* while no error, flush received data */
   while (!ipcerror)
      {
      i = 1;
      flags = 0x4;  /* Discard remaining data */
      IPCRECV(virt_desc,&data.buffer,&i,&flags,NULL,&ipcerror);
      }
   /* Following check for graceful or remote abort removed so that
      we always shutdown forcefully.  MPE/iX 4.0 was *not* releasing
      it's sockets even after the checks below passed (Jeff,4/11/94)
   if ((ipcerror != 64) && (ipcerror != 68))  */
      IPCSHUTDOWN(virt_desc);                  /* Forced shutdown */
 
}  /*  end of close_vsocket() */
 
[\] Jeff Kell <[log in to unmask]>

ATOM RSS1 RSS2