[PD] UDP server with Pd
msp at ucsd.edu
Tue Jun 8 18:01:03 CEST 2021
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 at 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.
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.
More information about the Pd-list