[PD] how to debug tcpsocketserver?

Roman Haefeli reduzent at gmail.com
Mon Apr 16 15:03:19 CEST 2012

On Sat, 2012-04-14 at 15:28 +0200, rolf wrote:
> hello roman,
> > May I ask what is your reasoningu behind your use of [tcpsocketserver]
> > over [tcpserver]?
> > 
> it's my first try at using network objects inside Pd.
> the communication is between Pd patches, doable with FUDI.
> (it took me some time to find out that FUDI is not some mysterious
> protocol but about Pd messages).
> because i have a number of clients [tcpsocketserver] seemed the right
> choice, for the reasons you mention yourself.

Ah, ok. Just to be sure ;-)

> > It's not possible to handle packet oriented protocols correctly with
> > plain [tcpserver], since you might receive packets from different
> > clients interleaved. That is why [tcpsocketserver] was written.
> > 
> actually, i'm slowly developing the Pd-clients and how to 'conduct' 10
> or more live, so for the moment sticking to a one-sided server-broadcast
> communication, which can do with [tcpserver].

Actually, if you want a FUDI server, there is already [netserver] from
maxlib. It should work for most cases. AFAIK, maxlib is not actively
maintained anymore and I had a problem with [netserver], because it is
relatively easy to make it block Pd, as it is not threaded at all. That 
is why wrote [tcpsocket.FUDI], which can be used with [tcpserver].

Regarding your initially posted problem with not receiving all messages
from your clients, I might only be able to help you with more
information (How are you creating the FUDI messages? Are they properly
delimited? etc.). The packet delimiter of [tcpsocket.FUDI] is pretty
simple: It waits for a semicolon (';', ascii 59) and flushes its buffer,
when it receives one. So you need to make sure, that your packets really
are delimited by semi-colons (and not commas or new-line-only).

> my problem with tcpsocketserver which started this thread is therefore
> momentarily in the waiting room.
> trying out the iemnet server like suggested by martin: iemnet is not in
> Pdext.

It is included since Pd-0.43-extended.


More information about the Pd-list mailing list