[PD] netserver issue

Roman Haefeli reduzent at gmail.com
Mon Apr 8 14:53:41 CEST 2013

On Son, 2013-04-07 at 19:16 +0200, Jeppi Jeppi wrote:
> Hi all,
> Is there a limit of about 256 floats that be sent as a single message
> with [netserver]? I attach an example which makes pd explode as soon
> as the long message is sent with the client connected or not.

[netserver] is from maxlib which has not really a maintainer anymore, as
far as I know. This probably makes it unlikely it will get fixed. On the
other hand, it's probably an easy fix to increase that buffer.

On the long run, I wouldn't recommend using it. There is also
[tcpserver] from iemnet which does not speak FUDI, but plain TCP and
which is much more mature and still has a maintainer. There are many
ways to make [netserver] block Pd completely (if not crash), especially
if many clients connect to it - and all those issues are fixed in

Since [tcpserver] deals with plain bytes, you'd need to find a way to
encapsulated your float numbers into the byte stream and also a way to
delimit the so created packets. This would probably look like this:

[slipenc 16384]
[list prepend send <socket-no>]
[list trim]
[iemnet/tcpserver <port>]
[slipdec 16384]

This would allow you to send messages like:
'/someaddress <float1> <float2> <float3> ... <float1000>'

The first argument given to [slipenc]/[slipdec] would define your
maximum packet size.

> If so, would it be a way to allow for larger buffers? 

I haven't checked, but probably you'll find some buffersize definition
in the source code. You could increase that value and re-compile. If I
remember correctly, it is set to 4kB which matches with your experienced
limit of 256 float numbers, if they are of the form 0.12345 (count the
spaces between the numbers).


More information about the Pd-list mailing list