HP3000-L Archives

November 1995, Week 2

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:
Steve Dirickson b894 westwins <[log in to unmask]>
Reply To:
Steve Dirickson b894 westwins <[log in to unmask]>
Date:
Mon, 13 Nov 1995 15:14:00 P
Content-Type:
text/plain
Parts/Attachments:
text/plain (32 lines)
Does anyone have any information on why the "approved" sequence for
shutting down NetIPC sockets, i.e. something along the lines of
 
void DeleteSocket(PSOCKET pSock)
 {
 if (pSock) {
  int flag = 0x00004000;    /* graceful release */
  int res32 = 0;
  IPCSHUTDOWN(pSock->m_hSocket, &flag,, &res32);
  if (res32)
   printf("Socket %d IPCSHUTDOWN error: %d\n", pSock->m_hSocket, res32);
  else while (!res32)
   {
   char data[2];
   int dlen = 1;
   flag = 4;      /* destroy data */
   IPCRECV(pSock->m_hSocket, data, &dlen, &flag,, &res32);
   }
  flag = 0;
  IPCSHUTDOWN(pSock->m_hSocket, &flag,, &res32); /* hard shutdown */
  free(pSock);
  }
 }
 
produces
   Socket 12 IPCSHUTDOWN error: 7
? Error 7 being "invalid FLAGS parameter". It doesn't cause an
operational problem, but the error is irritating. Thanks.
 
Steve Dirickson         WestWin Consulting
(360) 598-6111  [log in to unmask]

ATOM RSS1 RSS2