Hello,
I'm trying to send data from java to PD with UDP protocol. I tried this :
netAddress address = InetAddress.getByName("hostName"); int port = 4321;
String ch = "Le message à envoyer"; int chl = ch.length;
byte[] message = new byte[chl]; ch.getBytes(0, chl, message, 0);
DatagramPacket p = new DatagramPacket(message, chl, address, port); datagramSocket s = new DatagramSocket();
But it doesn't work.
I'm using a simple netreceive object in pure data with a print.
Any help would be appreciated.
Thanks in advance.
I sent this message yesterday but I don't know if it has correctly been sent. Sorry if you received this message twice.
Mickaël.
mstamm@itin.fr wrote:
Hello,
I'm trying to send data from java to PD with UDP protocol. I tried this :
netAddress address = InetAddress.getByName("hostName"); int port = 4321;
String ch = "Le message à envoyer";
Try:
String ch = "Le message à envoyer;\n";
Don't know wether Pd likes the 'Ã ', so maybe you'll have to do without it. All messages have to end with a semicolon followed by newline ('\n') to make netreceive happy.
Olaf