[PATCH] Cygwin: connect: implement resetting a connected DGRAM socket

Ken Brown kbrown@cornell.edu
Tue Apr 27 13:48:36 GMT 2021


On 4/27/2021 9:19 AM, Corinna Vinschen wrote:
> On Apr 26 15:37, Ken Brown wrote:
>> Following POSIX and Linux, allow a connected DGRAM socket's connection
>> to be reset (so that the socket becomes unconnected).  This is done by
>> calling connect and specifing an address whose family is AF_UNSPEC.
>> ---
>>   winsup/cygwin/fhandler_socket_inet.cc  | 21 ++++++++++++++++--
>>   winsup/cygwin/fhandler_socket_local.cc | 30 +++++++++++++++++++++-----
>>   winsup/cygwin/fhandler_socket_unix.cc  |  7 ++++++
>>   winsup/cygwin/release/3.2.1            |  3 +++
>>   winsup/doc/new-features.xml            |  6 ++++++
>>   5 files changed, 60 insertions(+), 7 deletions(-)
> 
> LGTM.
> 
>> --- a/winsup/cygwin/release/3.2.1
>> +++ b/winsup/cygwin/release/3.2.1
>> @@ -1,6 +1,9 @@
>>   What's new:
>>   -----------
>>   
>> +- A connected datagram socket can now have its connection reset.  As
>> +  specified by POSIX and Linux, this is done by calling connect(2)
>> +  with an address structure whose family is AF_UNSPEC.
> 
> Isn't that just a bug, in theory?

I was thinking of it as a feature that hadn't been implemented yet.  But on 
second thought, I agree with you.  I'll change that.

Ken


More information about the Cygwin-patches mailing list