diff options
-rw-r--r-- | iemnet.c | 8 | ||||
-rw-r--r-- | iemnet.h | 12 |
2 files changed, 20 insertions, 0 deletions
@@ -28,6 +28,14 @@ void iemnet__addrout(t_outlet*status_outlet, t_outlet*address_outlet, if(address_outlet)outlet_list (address_outlet, gensym("list" ), 5, addr); } +void iemnet__numconnout(t_outlet*status_outlet, t_outlet*numconn_outlet, int numconnections) { + t_atom atom[1]; + SETFLOAT(atom, numconnections); + + if(status_outlet )outlet_anything(status_outlet , gensym("connections"), 1, atom); + if(address_outlet)outlet_float (address_outlet, numconnections); +} + void iemnet__streamout(t_outlet*outlet, int argc, t_atom*argv) { if(NULL==outlet)return; @@ -224,6 +224,18 @@ int iemnet__receiver_getsize(t_iemnet_receiver*); void iemnet__addrout(t_outlet*status_outlet, t_outlet*address_outlet, long address, unsigned short port); /** + * output the number of connections + * the given number of connections is first output through the status_outlet as a "connections" message + * and then as a single number through the numconn_outlet + * + * \param status_outlet outlet for general status messages + * \param address_outlet outlet for numconnections only + * \param numconnections the number of connections + */ +void iemnet__numconnout(t_outlet*status_outlet, t_outlet*numconn_outlet, int numconnections); + + +/** * output a list as a stream (serialize) * * the given list of atoms will be sent to the output one-by-one |