Subject: | |
From: | |
Reply To: | |
Date: | Mon, 13 Nov 1995 15:14:00 P |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
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]
|
|
|