delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
From: | "Dave Korn" <dk AT artimi DOT com> |
To: | <cygwin AT cygwin DOT com> |
Subject: | RE: shutdown( socket, SHUT_WR ) - unexpected behaviour |
Date: | Tue, 4 May 2004 10:20:17 +0100 |
MIME-Version: | 1.0 |
In-Reply-To: | <BAY9-F40V9Zghpvafmj0000c44a@hotmail.com> |
Message-ID: | <NUTMEGXRPmcarcR4ZDg00000163@NUTMEG.CAM.ARTIMI.COM> |
X-OriginalArrivalTime: | 04 May 2004 09:20:16.0375 (UTC) FILETIME=[0316C070:01C431B9] |
> -----Original Message----- > From: cygwin-owner On Behalf Of Arash Partow > Sent: 04 May 2004 07:37 > Hi, > > Just out of curiosity, if one were to do: > > shutdown(sck,SHUT_WR) > > > which means as far as I understand it "stop all send reqs > made to sck", > how would one reopen the sck so that you could make send reqs again? > > Is that even possible or do you have to reestablish the connection > again from scratch? > > I've been looking at the man pages for shutdown on linux and netbsd > and they don't say anything about how you can reverse this effect. In the general case, you can't. shutdown is irreversible and you need to close the socket and open and connect a new one. This is certainly the case for AF_INET sockets, anyway; YMMV with some of the more exotic connection-oriented transports that winsock providers exist for, and I don't know about Unix domain sockets either. But for generic TCP/IP: you can't do it. cheers, DaveK -- Can't think of a witty .sigline today.... -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |