[PD] tcpserver, flush?

IOhannes m zmölnig zmoelnig at iem.at
Tue Jun 16 00:12:16 CEST 2020


On 2020-06-15 17:05, Roman Haefeli wrote:
> On Sun, 2020-06-14 at 22:26 +0200, IOhannes m zmölnig wrote:
>> On 2020-06-14 22:22, rolfm at dds.nl wrote:
>>> and can tcpserver be 'forced' to treat them equally? 
>>>
>>> any hint is welcome. 
>>
>> not really helping, but does the same happen with iemnet/tcpserver?
> 
> Surely not, since iemnet tpc classes output a stream of floats and do
> not try to "guess" some kind of message.

ah, obviously i was confused about the actual problem (so much for the
"domain experts").

but then, not really: it's true that the iemnet's tcp-objects will
output single bytes (rather than packet-like lists) when *receiving*
data, but the question here seems to be about *sending*.

of course, in reality the problem is most likely about mrpeach/tcpclient
vs the node-client (rather than mrpeach/tcpserver, as the subject suggests).
and here the problem is (most likely) not that one client outputs the
data in different chunks than the other, but that you try to send
*packets* over a a TCP/IP connection without further delimiting.

this just cannot work.

it can't work due to the nature of TCP/IP (which is a stream-protocol,
and doesn't know anything about packets).
of course, sometimes it *does* work, like any buggy software that is
worth its buck. but in the general case it won't.

which is the reason why iemnet's tcp-objects output this impractical
single-byte messages: to force the user to deal with the problem from
the beginning (e.g. by using mrpeach's fabulous [slipenc]/[slipdec]
objects) rather than wait for the house to fall apart one the day before
the show.


gasmdr
IOhannes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20200616/6818d9c5/attachment.sig>


More information about the Pd-list mailing list