aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--externals/vanilla/netreceive.c4
-rw-r--r--externals/vanilla/netsend.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/externals/vanilla/netreceive.c b/externals/vanilla/netreceive.c
index 468bad49..1345587e 100644
--- a/externals/vanilla/netreceive.c
+++ b/externals/vanilla/netreceive.c
@@ -121,6 +121,10 @@ static void *netreceive_new(t_symbol *compatflag,
&intarg, sizeof(intarg)) < 0)
post("setsockopt (SO_RCVBUF) failed\n");
#endif
+ intarg = 1;
+ if(setsockopt(sockfd, SOL_SOCKET, SO_BROADCAST,
+ (const void *)&intarg, sizeof(intarg)) < 0)
+ post("setting SO_BROADCAST");
/* Stream (TCP) sockets are set NODELAY */
if (!udp)
{
diff --git a/externals/vanilla/netsend.c b/externals/vanilla/netsend.c
index e2d15ab2..0b64242f 100644
--- a/externals/vanilla/netsend.c
+++ b/externals/vanilla/netsend.c
@@ -76,6 +76,10 @@ static void netsend_connect(t_netsend *x, t_symbol *hostname,
&intarg, sizeof(intarg)) < 0)
post("setsockopt (SO_RCVBUF) failed\n");
#endif
+ intarg = 1;
+ if(setsockopt(sockfd, SOL_SOCKET, SO_BROADCAST,
+ (const void *)&intarg, sizeof(intarg)) < 0)
+ post("setting SO_BROADCAST");
/* for stream (TCP) sockets, specify "nodelay" */
if (x->x_protocol == SOCK_STREAM)
{