setsockopt() SO_LINGER and immediate close socket
- From: Jan Fuchs <JanFuchs@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 2 Nov 2008 14:47:00 -0800
Hi,
set_linger.l_onoff = 1;
set_linger.l_linger = 0;
setsockopt(sockfd, SOL_SOCKET, SO_LINGER, (char *)&set_linger,
sizeof(set_linger));
After call:
shutdown(fd, SD_BOTH);
closesocket(fd);
I will immediate close socket. But socket not close because in output buffer
is not send data. I will discards data in output buffer and send RESET
connection. In Linux and Wine work before setup SO_LINGER correct. What not
work correct in Windows?
Thanks for answer.
Best regards Jan Fuchs
.
- Prev by Date: UDP tracing
- Next by Date: Re: IOCP and WSASend/WSARecv
- Previous by thread: UDP tracing
- Next by thread: Re: IOCP and WSASend/WSARecv
- Index(es):
Relevant Pages
|