diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2012-02-20 18:42:51 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2012-02-20 18:42:51 +0000 |
commit | 02a3b685d9b997789412d454d1f4eb942d918709 (patch) | |
tree | 59bcb5a1d96504c7fc716be5478a9c789336111d /externals | |
parent | 7b65906d1a204c48d2f5a7ca6dad2002fa72b057 (diff) |
sync with x_net.c from pure-data.git 0.43-1
svn path=/trunk/; revision=16007
Diffstat (limited to 'externals')
-rw-r--r-- | externals/vanilla/netreceive.c | 4 | ||||
-rw-r--r-- | externals/vanilla/netsend.c | 4 |
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) { |