diff options
Diffstat (limited to 'pd/src/x_net.c')
-rw-r--r-- | pd/src/x_net.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pd/src/x_net.c b/pd/src/x_net.c index 9d1aee0b..7e0d0be4 100644 --- a/pd/src/x_net.c +++ b/pd/src/x_net.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) { @@ -282,6 +286,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) { |