With the Pd net object overhaul, pd is using sendto with UDP as suggested by Christof as well, I believe.
I agree that it would be nice to change the "connect" metaphor with UDP and [netsend -u]. Maybe one approach is to add another message such as your "to" which only works for UDP while retaining current "connect" functionality to not break patches.
On Jun 7, 2021, at 11:00 PM, pd-list-request@lists.iem.at wrote:
Message: 4 Date: Mon, 7 Jun 2021 23:00:21 +0200 From: Christof Ressi <info@christofressi.com mailto:info@christofressi.com> To: Martin Peach <chakekatzil@gmail.com mailto:chakekatzil@gmail.com>, Pd-List <pd-list@lists.iem.at mailto:pd-list@lists.iem.at> Subject: Re: [PD] UDP server with Pd Message-ID: <df5de976-556c-2a67-01f5-0c95d3adc92f@christofressi.com mailto:df5de976-556c-2a67-01f5-0c95d3adc92f@christofressi.com> Content-Type: text/plain; charset=utf-8; format=flowed
Great to hear!
On 07.06.2021 22:57, Martin Peach wrote:
So I changed it to use sendto and it works a lot better. It receives from multiple clients while sending to any one. I added a [to ( message to set the destination, and removed the [connect( and [disconnect{ methods. Thanks Christof for the critique!.
Martin
Dan Wilcox @danomatika http://twitter.com/danomatika danomatika.com http://danomatika.com/ robotcowboy.com http://robotcowboy.com/
Yep, I was going to propose that too. It would simplify my 'conniption' objects a lot to have that possibility!
cheers M
On Tue, Jun 08, 2021 at 02:45:10PM +0200, Dan Wilcox wrote:
With the Pd net object overhaul, pd is using sendto with UDP as suggested by Christof as well, I believe.
I agree that it would be nice to change the "connect" metaphor with UDP and [netsend -u]. Maybe one approach is to add another message such as your "to" which only works for UDP while retaining current "connect" functionality to not break patches.
On Jun 7, 2021, at 11:00 PM, pd-list-request@lists.iem.at wrote:
Message: 4 Date: Mon, 7 Jun 2021 23:00:21 +0200 From: Christof Ressi <info@christofressi.com mailto:info@christofressi.com> To: Martin Peach <chakekatzil@gmail.com mailto:chakekatzil@gmail.com>, Pd-List <pd-list@lists.iem.at mailto:pd-list@lists.iem.at> Subject: Re: [PD] UDP server with Pd Message-ID: <df5de976-556c-2a67-01f5-0c95d3adc92f@christofressi.com mailto:df5de976-556c-2a67-01f5-0c95d3adc92f@christofressi.com> Content-Type: text/plain; charset=utf-8; format=flowed
Great to hear!
On 07.06.2021 22:57, Martin Peach wrote:
So I changed it to use sendto and it works a lot better. It receives from multiple clients while sending to any one. I added a [to ( message to set the destination, and removed the [connect( and [disconnect{ methods. Thanks Christof for the critique!.
Martin
Dan Wilcox @danomatika <https://urldefense.proofpoint.com/v2/url?u=http-3A__twitter.com_danomatika&a... > danomatika.com <https://urldefense.proofpoint.com/v2/url?u=http-3A__danomatika.com_&d=Dw... > robotcowboy.com <https://urldefense.proofpoint.com/v2/url?u=http-3A__robotcowboy.com_&d=D... >
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.puredata.info_lis...
P.S. maybe 'sendto' would be clearer - 'to' could be misunderstood as just setting a return port/addr for a later 'send' (which I think would make netreceive -u unnecessarily stateful).
On Tue, Jun 08, 2021 at 08:01:30AM -0700, Miller Puckette via Pd-list wrote:
Yep, I was going to propose that too. It would simplify my 'conniption' objects a lot to have that possibility!
cheers M
Am 8. Juni 2021 17:05:13 MESZ schrieb Miller Puckette via Pd-list pd-list@lists.iem.at:
P.S. maybe 'sendto' would be clearer - 'to' could be misunderstood as just setting a return port/addr for a later 'send' (which I think would make netreceive -u unnecessarily stateful).
i think 'sendto' only makes sense as [sendto example.com 6000 10 20( that is: specifying both target and data in a single message (as the name is so close to 'send'). I think this is what you want to do anyhow.
I wonder about efficiency though: each 'sendto' would trigger a host lookup, which is probably cached by the OS, but even so might still be rather costy.
mfg.fsd.sgj IOhannes
On Tue, Jun 08, 2021 at 05:44:39PM +0200, IOhannes m zm?lnig wrote:
Am 8. Juni 2021 17:05:13 MESZ schrieb Miller Puckette via Pd-list pd-list@lists.iem.at:
P.S. maybe 'sendto' would be clearer - 'to' could be misunderstood as just setting a return port/addr for a later 'send' (which I think would make netreceive -u unnecessarily stateful).
i think 'sendto' only makes sense as [sendto example.com 6000 10 20( that is: specifying both target and data in a single message (as the name is so close to 'send'). I think this is what you want to do anyhow.
I wonder about efficiency though: each 'sendto' would trigger a host lookup, which is probably cached by the OS, but even so might still be rather costy.
mfg.fsd.sgj IOhannes
I think usually you'd use this for replying to incoming messages in which case you'd already have the IP addr. And if you do indeed have a hostname, I think it would be unwise to cache the IP adress resolution in the application (it might change).
Yes, I was imagining "sendto" combining port, address, and message all in one.
cheers M