diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2011-10-09 16:36:37 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2011-10-09 16:36:37 +0000 |
commit | 21c068f1916330e90f814bed461fe0821d1665ec (patch) | |
tree | 949b73696fff09a44b8d3eb01b70bae7174cbd14 /pd/src/x_net.c | |
parent | bf8ced1efe1a032342e864edc635fa4e2676670d (diff) |
checked in pd-0.43-0.src.tar.gz
svn path=/trunk/; revision=15557
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) { |