I read:
does pd expect some handshaking or a stream header before It passes the data to the outlet?
no
you can test your patch (and the script) using telnet or (a bit more flexible) netcat ... I guess sth. else is wrong could you put your patch/script on the net somewhere for inspection ??
atb
x