I can confirm that both [iemnet/udpsend] [mrpeach/udpsend] (from Pd extended) close the socket on Linux but only [mrpeach/udpsend] gives a warning and sends a 0. I'll do a bug report.
Christof > Gesendet: Samstag, 26. Januar 2019 um 00:15 Uhr > Von: "Christof Ressi" <christof.re...@gmx.at> > An: "Roman Haefeli" <reduz...@gmail.com> > Cc: Pd-List <pd-list@lists.iem.at> > Betreff: Re: [PD] ugly "already connected" errors > > > The key is that you send something between deletion > > and recreation. > > I do! > > > BTW, that's on Linux, maybe other platforms behave differently? > > Could be, I'm currently on windows but I'll check on my linux and osx > machines. > > > Gesendet: Freitag, 25. Januar 2019 um 23:48 Uhr > > Von: "Roman Haefeli" <reduz...@gmail.com> > > An: pd-list@lists.iem.at > > Betreff: Re: [PD] ugly "already connected" errors > > > > On Fri, 2019-01-25 at 22:44 +0100, Christof Ressi wrote: > > > > From reading a bit more about protocols, particularly about ICMP > > > > [1], I > > > > think what happens is that the receiving host sends a ICMP error > > > > packet > > > > to the sending host, telling that the destination port is > > > > unreachable. > > > > > > thanks, this might explain what happens. note, though, that this is > > > not required behaviour for a UDP socket (and I haven't encountered > > > this outside Pd), so I would rather make this optional (or add an > > > option to deactivate this). The reason is that sometimes you just > > > want to broadcast messages no matter if something is actually > > > listening and you don't want that the sender to shut down just > > > because the receiver is temporarily unavailable. of course you can > > > wrap each message in a [connect( [disconnect( pair, but I think it's > > > only an ugly workaround. > > > > Yeah, I see how the current behavior is impractical. I'm just saying it > > is probably not a bug. > > > > > > can tell that the socket of [udpsend] is closed, because when you > > > > fire > > > > up the listening socket again, messages sent with [udpsend] still > > > > don't > > > > reach their destination. > > > > > > I can't confirm this. I just tested with a pair of [udpsend] and > > > [udpreceive] (both iemlib and mrpeach) and I can change ports in > > > [udpreceive] or delete/recreate it without [udpsend] closing its > > > socket. only tested via localhost, though. > > > > The key is that you send something between deletion and recreation. > > Otherwise you won't trigger an ICMP response. I tested also on > > localhost with a [udpreceive] and still get same behaviour I described. > > BTW, that's on Linux, maybe other platforms behave differently? > > > > Roman > > _______________________________________________ > > Pd-list@lists.iem.at mailing list > > UNSUBSCRIBE and account-management -> > > https://lists.puredata.info/listinfo/pd-list > > > > > > _______________________________________________ > Pd-list@lists.iem.at mailing list > UNSUBSCRIBE and account-management -> > https://lists.puredata.info/listinfo/pd-list > _______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list