Damien HENRY schrieb:
any idea about the netreceive now ;-)
Ok, in line 244 of x_net.c (from pd0.35-test23) add:
outlet_symbol( x->x_connectionip, gensym( inet_ntoa( incomer_address.sin_addr) ) );
and add the outlet in the new function. This will output the IP address of the netsend/netdist on connection...
Olaf
Damien.
Le Vendredi 17 Mai 2002 01:44, Olaf Matthes a écrit :
Hi,
no problem, check the site again and look for 'netdist' (not yet included in the library). It's a multithreaded netsend that has been modyfied to allow multiple connections in 'dist' style. I hope the multithreading stuff will work under Linux as well...
Olaf
Damien HENRY schrieb:
there are two objects, 'dist' and 'remote', which can be used to send data to 'receive' objects. 'dist' (or just 'd') allows to use 'connect <name>' messages to add names of receive objects to a list (and 'disconnect <name>' to remove them).
I've testing them yet, but the basic idea of thoses too object is just fantastic !
I'm looking for the same, but about netsend & netreceive.
I whant to be able to send from 1 object to an arbitrary number of netreiceve. In the code of the netsend object (x_net.c )there is a test to disable the creation of a new socket if there is already a connection.
if (x->x_fd >= 0) { error("netsend_connect: already connected"); return; }
/* create a socket */ sockfd = socket(AF_INET, x->x_protocol, 0);
if I remove this test, is there a chance that it will work without crashing ?
Netreceive is already able to receive from diferent sources and even to tell to how many. But is there here a socket gourou to give me a clue to do the hack in way that netreceive will output things like :
19.168.1.1 test 1 19.168.1.3 test 3
I mean to use the IP addresse of the sender as a selector. my goal is to diferentiate the data by their sender.
Thanks to anyone that can help me about it.
Cheers Damien.