aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/tcpclient.c12
-rw-r--r--net/tcpreceive.c12
-rw-r--r--net/tcpsend.c2
-rw-r--r--net/tcpserver.c18
-rw-r--r--net/udpreceive.c8
-rw-r--r--net/udpreceive~.c8
-rw-r--r--net/udpsend.c2
-rw-r--r--net/udpsend~.c4
8 files changed, 33 insertions, 33 deletions
diff --git a/net/tcpclient.c b/net/tcpclient.c
index dc61403..d977c86 100644
--- a/net/tcpclient.c
+++ b/net/tcpclient.c
@@ -483,9 +483,9 @@ static void tcpclient_rcv(t_tcpclient *x)
x->x_addrbytes[1].a_w.w_float = (x->x_addr & 0x0FF0000)>>16;
x->x_addrbytes[2].a_w.w_float = (x->x_addr & 0x0FF00)>>8;
x->x_addrbytes[3].a_w.w_float = (x->x_addr & 0x0FF);
- outlet_list(x->x_addrout, gensym("list"), 4L, x->x_addrbytes);
+ outlet_list(x->x_addrout, &s_list, 4L, x->x_addrbytes);
/* send the list out the outlet */
- if (ret > 1) outlet_list(x->x_msgout, gensym("list"), ret, x->x_msgoutbuf);
+ if (ret > 1) outlet_list(x->x_msgout, &s_list, ret, x->x_msgoutbuf);
else outlet_float(x->x_msgout, x->x_msgoutbuf[0].a_w.w_float);
}
else
@@ -523,10 +523,10 @@ static void *tcpclient_new(t_floatarg udpflag)
int i;
t_tcpclient *x = (t_tcpclient *)pd_new(tcpclient_class);
- x->x_msgout = outlet_new(&x->x_obj, 0); /* received data */
- x->x_addrout = outlet_new(&x->x_obj, gensym("list"));
- x->x_connectout = outlet_new(&x->x_obj, gensym("float")); /* connection state */
- x->x_statusout = outlet_new(&x->x_obj, 0);/* last outlet for everything else */
+ x->x_msgout = outlet_new(&x->x_obj, &s_anything); /* received data */
+ x->x_addrout = outlet_new(&x->x_obj, &s_list);
+ x->x_connectout = outlet_new(&x->x_obj, &s_float); /* connection state */
+ x->x_statusout = outlet_new(&x->x_obj, &s_anything);/* last outlet for everything else */
x->x_sendclock = clock_new(x, (t_method)tcpclient_sent);
x->x_clock = clock_new(x, (t_method)tcpclient_tick);
x->x_poll = clock_new(x, (t_method)tcpclient_poll);
diff --git a/net/tcpreceive.c b/net/tcpreceive.c
index 5b25c1c..418e77b 100644
--- a/net/tcpreceive.c
+++ b/net/tcpreceive.c
@@ -101,9 +101,9 @@ static void tcpreceive_read(t_tcpreceive *x, int sockfd)
x->x_addrbytes[2].a_w.w_float = (addr & 0x0FF00)>>8;
x->x_addrbytes[3].a_w.w_float = (addr & 0x0FF);
x->x_addrbytes[4].a_w.w_float = port;
- outlet_list(x->x_addrout, gensym("list"), 5L, x->x_addrbytes);
+ outlet_list(x->x_addrout, &s_list, 5L, x->x_addrbytes);
/* send the list out the outlet */
- if (read > 1) outlet_list(x->x_msgout, gensym("list"), read, x->x_msgoutbuf);
+ if (read > 1) outlet_list(x->x_msgout, &s_list, read, x->x_msgoutbuf);
else outlet_float(x->x_msgout, x->x_msgoutbuf[0].a_w.w_float);
}
}
@@ -150,9 +150,9 @@ static void *tcpreceive_new(t_floatarg fportno)
return (0);
}
x = (t_tcpreceive *)pd_new(tcpreceive_class);
- x->x_msgout = outlet_new(&x->x_obj, 0);
- x->x_addrout = outlet_new(&x->x_obj, gensym("list"));
- x->x_connectout = outlet_new(&x->x_obj, gensym("float"));
+ x->x_msgout = outlet_new(&x->x_obj, &s_anything);
+ x->x_addrout = outlet_new(&x->x_obj, &s_list);
+ x->x_connectout = outlet_new(&x->x_obj, &s_float);
/* clear the connection list */
for (i = 0; i < MAX_CONNECTIONS; ++i)
{
@@ -220,7 +220,7 @@ static void tcpreceive_connectpoll(t_tcpreceive *x)
x->x_addrbytes[2].a_w.w_float = (addr & 0x0FF00)>>8;
x->x_addrbytes[3].a_w.w_float = (addr & 0x0FF);
x->x_addrbytes[4].a_w.w_float = port;
- outlet_list(x->x_addrout, gensym("list"), 5L, x->x_addrbytes);
+ outlet_list(x->x_addrout, &s_list, 5L, x->x_addrbytes);
}
else
{
diff --git a/net/tcpsend.c b/net/tcpsend.c
index d452726..b576eae 100644
--- a/net/tcpsend.c
+++ b/net/tcpsend.c
@@ -38,7 +38,7 @@ static void *tcpsend_new(void);
static void *tcpsend_new(void)
{
t_tcpsend *x = (t_tcpsend *)pd_new(tcpsend_class);
- outlet_new(&x->x_obj, gensym("float"));
+ outlet_new(&x->x_obj, &s_float);
x->x_fd = -1;
return (x);
}
diff --git a/net/tcpserver.c b/net/tcpserver.c
index 80f7cbb..a08ca82 100644
--- a/net/tcpserver.c
+++ b/net/tcpserver.c
@@ -224,7 +224,7 @@ static int tcpserver_socketreceiver_doread(t_tcpserver_socketreceiver *x)
if (y->x_dump)tcpserver_hexdump(&inbuf[intail], i);
- if (i > 1) outlet_list(y->x_msgout, gensym("list"), i, y->x_msgoutbuf);
+ if (i > 1) outlet_list(y->x_msgout, &s_list, i, y->x_msgoutbuf);
else outlet_float(y->x_msgout, y->x_msgoutbuf[0].a_w.w_float);
// intail = (indx+1)&(INBUFSIZE-1);
@@ -283,7 +283,7 @@ static void tcpserver_socketreceiver_read(t_tcpserver_socketreceiver *x, int fd)
y->x_addrbytes[1].a_w.w_float = (y->x_sr[i]->sr_addr & 0x0FF0000)>>16;
y->x_addrbytes[2].a_w.w_float = (y->x_sr[i]->sr_addr & 0x0FF00)>>8;
y->x_addrbytes[3].a_w.w_float = (y->x_sr[i]->sr_addr & 0x0FF);
- outlet_list(y->x_addrout, gensym("list"), 4L, y->x_addrbytes);
+ outlet_list(y->x_addrout, &s_list, 4L, y->x_addrbytes);
break;
}
}
@@ -810,7 +810,7 @@ static void tcpserver_notify(t_tcpserver *x)
x->x_addrbytes[1].a_w.w_float = (x->x_sr[i]->sr_addr & 0x0FF0000)>>16;
x->x_addrbytes[2].a_w.w_float = (x->x_sr[i]->sr_addr & 0x0FF00)>>8;
x->x_addrbytes[3].a_w.w_float = (x->x_sr[i]->sr_addr & 0x0FF);
- outlet_list(x->x_addrout, gensym("list"), 4L, x->x_addrbytes);
+ outlet_list(x->x_addrout, &s_list, 4L, x->x_addrbytes);
outlet_float(x->x_sockout, x->x_sr[i]->sr_fd); /* the socket number */
outlet_float(x->x_connectout, x->x_nconnections);
/* /Ivica Ico Bukvic */
@@ -881,7 +881,7 @@ static void tcpserver_connectpoll(t_tcpserver *x)
x->x_addrbytes[1].a_w.w_float = (x->x_sr[i]->sr_addr & 0x0FF0000)>>16;
x->x_addrbytes[2].a_w.w_float = (x->x_sr[i]->sr_addr & 0x0FF00)>>8;
x->x_addrbytes[3].a_w.w_float = (x->x_sr[i]->sr_addr & 0x0FF);
- outlet_list(x->x_addrout, gensym("list"), 4L, x->x_addrbytes);
+ outlet_list(x->x_addrout, &s_list, 4L, x->x_addrbytes);
outlet_float(x->x_sockout, x->x_sr[i]->sr_fd); /* the socket number */
outlet_float(x->x_connectout, x->x_nconnections);
}
@@ -943,7 +943,7 @@ static void *tcpserver_new(t_floatarg fportno)
return (0);
}
x = (t_tcpserver *)pd_new(tcpserver_class);
- x->x_msgout = outlet_new(&x->x_obj, 0); /* 1st outlet for received data */
+ x->x_msgout = outlet_new(&x->x_obj, &s_anything); /* 1st outlet for received data */
/* streaming protocol */
if (listen(sockfd, 5) < 0)
{
@@ -954,10 +954,10 @@ static void *tcpserver_new(t_floatarg fportno)
else
{
sys_addpollfn(sockfd, (t_fdpollfn)tcpserver_connectpoll, x);
- x->x_connectout = outlet_new(&x->x_obj, gensym("float")); /* 2nd outlet for number of connected clients */
- x->x_sockout = outlet_new(&x->x_obj, gensym("float")); /* 3rd outlet for socket number of current client */
- x->x_addrout = outlet_new(&x->x_obj, gensym("list")); /* 4th outlet for ip address of current client */
- x->x_status_outlet = outlet_new(&x->x_obj, 0);/* 5th outlet for everything else */
+ x->x_connectout = outlet_new(&x->x_obj, &s_float); /* 2nd outlet for number of connected clients */
+ x->x_sockout = outlet_new(&x->x_obj, &s_float); /* 3rd outlet for socket number of current client */
+ x->x_addrout = outlet_new(&x->x_obj, &s_list); /* 4th outlet for ip address of current client */
+ x->x_status_outlet = outlet_new(&x->x_obj, &s_anything);/* 5th outlet for everything else */
}
x->x_connectsocket = sockfd;
x->x_nconnections = 0;
diff --git a/net/udpreceive.c b/net/udpreceive.c
index 2ac09df..a9ac791 100644
--- a/net/udpreceive.c
+++ b/net/udpreceive.c
@@ -63,7 +63,7 @@ static void udpreceive_read(t_udpreceive *x, int sockfd)
x->x_addrbytes[2].a_w.w_float = (addr & 0x0FF00)>>8;
x->x_addrbytes[3].a_w.w_float = (addr & 0x0FF);
x->x_addrbytes[4].a_w.w_float = port;
- outlet_list(x->x_addrout, gensym("list"), 5L, x->x_addrbytes);
+ outlet_list(x->x_addrout, &s_list, 5L, x->x_addrbytes);
if (read < 0)
{
@@ -79,7 +79,7 @@ static void udpreceive_read(t_udpreceive *x, int sockfd)
x->x_msgoutbuf[i].a_w.w_float = (float)(unsigned char)x->x_msginbuf[i];
}
/* send the list out the outlet */
- if (read > 1) outlet_list(x->x_msgout, gensym("list"), read, x->x_msgoutbuf);
+ if (read > 1) outlet_list(x->x_msgout, &s_list, read, x->x_msgoutbuf);
else outlet_float(x->x_msgout, x->x_msgoutbuf[0].a_w.w_float);
}
}
@@ -122,8 +122,8 @@ static void *udpreceive_new(t_floatarg fportno)
return (0);
}
x = (t_udpreceive *)pd_new(udpreceive_class);
- x->x_msgout = outlet_new(&x->x_obj, 0);
- x->x_addrout = outlet_new(&x->x_obj, gensym("list"));
+ x->x_msgout = outlet_new(&x->x_obj, &s_anything);
+ x->x_addrout = outlet_new(&x->x_obj, &s_list);
x->x_connectsocket = sockfd;
/* convert the bytes in the buffer to floats in a list */
diff --git a/net/udpreceive~.c b/net/udpreceive~.c
index 7a65a16..42bf7c7 100644
--- a/net/udpreceive~.c
+++ b/net/udpreceive~.c
@@ -211,7 +211,7 @@ static void udpreceive_tilde_datapoll(t_udpreceive_tilde *x)
x->x_addrbytes[2].a_w.w_float = (x->x_addr & 0x0FF00)>>8;
x->x_addrbytes[3].a_w.w_float = (x->x_addr & 0x0FF);
x->x_addrbytes[4].a_w.w_float = x->x_port;
- outlet_list(x->x_addrout, gensym("list"), 5L, x->x_addrbytes);
+ outlet_list(x->x_addrout, &s_list, 5L, x->x_addrbytes);
}
if (ret <= 0) /* error */
{
@@ -624,7 +624,7 @@ static void udpreceive_tilde_info(t_udpreceive_tilde *x)
SETFLOAT(list, (t_float)x->x_tag_errors);
outlet_anything(x->x_outlet2, ps_tag_errors, 1, list);
- outlet_list(x->x_addrout, gensym("list"), 5L, x->x_addrbytes);
+ outlet_list(x->x_addrout, &s_list, 5L, x->x_addrbytes);
}
static void udpreceive_tilde_tick(t_udpreceive_tilde *x)
@@ -655,8 +655,8 @@ static void *udpreceive_tilde_new(t_floatarg fportno, t_floatarg outlets, t_floa
x->x_noutlets = (int)outlets + 1; // extra outlet for valid flag
for (i = 0; i < x->x_noutlets; i++)
outlet_new(&x->x_obj, &s_signal);
- x->x_outlet2 = outlet_new(&x->x_obj, 0);
- x->x_addrout = outlet_new(&x->x_obj, gensym("list"));
+ x->x_outlet2 = outlet_new(&x->x_obj, &s_anything);
+ x->x_addrout = outlet_new(&x->x_obj, &s_list);
for (i = 0; i < 5; ++i)
{
x->x_addrbytes[i].a_type = A_FLOAT;
diff --git a/net/udpsend.c b/net/udpsend.c
index 014d380..98db672 100644
--- a/net/udpsend.c
+++ b/net/udpsend.c
@@ -38,7 +38,7 @@ static void *udpsend_new(void);
static void *udpsend_new(void)
{
t_udpsend *x = (t_udpsend *)pd_new(udpsend_class);
- outlet_new(&x->x_obj, gensym("float"));
+ outlet_new(&x->x_obj, &s_float);
x->x_fd = -1;
return (x);
}
diff --git a/net/udpsend~.c b/net/udpsend~.c
index 8210fc8..aa556c7 100644
--- a/net/udpsend~.c
+++ b/net/udpsend~.c
@@ -573,8 +573,8 @@ static void *udpsend_tilde_new(t_floatarg inlets, t_floatarg blocksize)
for (i = 1; i < x->x_ninlets; i++)
inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal);
- x->x_outlet = outlet_new(&x->x_obj, gensym("float"));
- x->x_outlet2 = outlet_new(&x->x_obj, gensym("list"));
+ x->x_outlet = outlet_new(&x->x_obj, &s_float);
+ x->x_outlet2 = outlet_new(&x->x_obj, &s_list);
x->x_clock = clock_new(x, (t_method)udpsend_tilde_notify);
x->x_myvec = (t_int **)t_getbytes(sizeof(t_int *) * (x->x_ninlets + 3));