HP3000-L Archives

November 1995, Week 3

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:
Tue, 14 Nov 1995 17:04:00 EST
Content-Type:
text/plain
Parts/Attachments:
text/plain (38 lines)
On Mon, 13 Nov 1995 15:14:00 P Steve Dirickson b894 westwins said:
>Does anyone have any information on why the "approved" sequence for
>shutting down NetIPC sockets [...]
 
I looked back through the archives and found an old exchange between Dan
Hollis and myself; I think the original "fix" was supplied by Frank McConnell.
For what it's worth, here goes:
 
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:
 
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