delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; q=dns; s= | |
default; b=SGGT1JnSMw7gZ5jFo0qTCHDZOVavqo/HtUP2o/I+FgcAvc3PKqezs | |
HsCaVnZ8TaRViCjHi5u4F1xm9ZmGwkNC2tY8UM9U0t7xO3YuSZ8tKHFjCi+ziUDQ | |
nEa3sYaX2JKZzALTZA7nBEjLMpsrmy7cShYzkjyfaVO6/vDRJtQEV4= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; s=default; | |
bh=cd8sFxPlw8Ushs0J4GPx3QNC4Ao=; b=Q+jAQsXrAfJElpgDORFVuLItGfrD | |
espcNPjOT716Q3nLgCT1ZtSke0LdAyLMSSLolltcoXn+2xStBYOQeDkuT55+R0wx | |
TzJ0UggAf0pPcnLBSi/tPh+mLjJm6g3Xa0xxkMgl5EBfe/5/oCoDWxypQG/2mF0V | |
YTdAi1Wj3tq8H80= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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 |
X-Spam-SWARE-Status: | No, score=-1.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.1 |
Date: | Fri, 12 Apr 2013 17:56:06 +0200 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: UDP/DTLS sockets communication pattern is broken in Cygwin |
Message-ID: | <20130412155606.GF11358@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <031222CBCF33214AB2EB4ABA279428A30140C1ACA374 AT SJCPMAILBOX01 DOT citrite DOT net> <20130411212115 DOT GA1376 AT ednor DOT casa DOT cgf DOT cx> <031222CBCF33214AB2EB4ABA279428A30140C1ACA378 AT SJCPMAILBOX01 DOT citrite DOT net> <20130412114354 DOT GC11358 AT calimero DOT vinschen DOT de> <031222CBCF33214AB2EB4ABA279428A30140C1ACA37B AT SJCPMAILBOX01 DOT citrite DOT net> |
MIME-Version: | 1.0 |
In-Reply-To: | <031222CBCF33214AB2EB4ABA279428A30140C1ACA37B@SJCPMAILBOX01.citrite.net> |
User-Agent: | Mutt/1.5.21 (2010-09-15) |
On Apr 12 08:44, Oleg Moskalenko wrote: > > > > > However, I think I found a workaround on the application level. > > Apparently all packets sent to a specific address are sent to the first socket > > which has been bound to the address. If that socket has been closed, the next in > > line gets the packets (unless it has been connected and the sender is not the > > connected address). So what I did was this: > > > > Before starting step 14, I created a third socket, which then replaced the server > > socket: > > Thank you, Corinna, for the reply and for the idea. > > Unfortunately, the workaround will work well only in the case of a single client. > In the multiple clients scenario, it will create a sort of race condition: > > 1) some packets already scheduled by OS to the "original" packet will be lost; > 2) some packets delivered in between the sockets destruction/creation will be wrongly rejected. > > But this is better than nothing. I'll think whether we can live with it. Too bad. I don't know the DTLS protocol, but isn't it possible to do the server part with a single UDP socket? If you keep track of the already connected clients, you know if the just incoming packet is a connected or connecting client, and then you can use different threads to handle the packet further. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |