Questions tagged [broadcast]

A broadcast is a one-to-many message passing interface. It is usually used in the context of a network programming or event-driven programming.

1905 questions
30
votes
3 answers

AngularJS $broadcast with multiple parameters

Can I have a $broadcast $on with multiple parameters, something like: $scope.$broadcast('event',$scope.item, $scope.item); Is it possible to have something like this or something similar in any case ?
blaa
  • 801
  • 3
  • 16
  • 32
29
votes
3 answers

UDP-Broadcast on all interfaces

On a Linux system with a wired and a wireless interface (e.g. 192.168.1.x and 192.168.2.x subnets) I want to send a UDP broadcast that goes out via ALL available interfaces (i.e. both through the wired and the wireless interface). Currently I…
Steven
26
votes
5 answers

Android : restart application after update - ACTION_PACKAGE_REPLACED

My application that is not on Play Store verify on the web If there are a new version and download and start it. After the installation I would like to restart the application and I would use a BroadcastRecevier with ACTION_PACKAGE_REPLACED. This is…
MisterX_Dev
  • 429
  • 2
  • 7
  • 16
25
votes
1 answer

Multicast vs Broadcast in LAN

Is there any advantage to using a multicast group to send messages rather than just broadcasting them to a specific port? I understand that when broadcasting, other computers that don't want the messages receive them too, but how much does it affect…
slartibartfast
  • 4,348
  • 5
  • 31
  • 46
25
votes
6 answers

angularJS $on event handler trigger order

I was wondering two things, in the context of angularJS event handling. How is defined the order in which handlers listening to the same event are triggered? Is it a sign of a bad design if you start wondering about this? After reading…
Renaud
  • 4,569
  • 7
  • 41
  • 72
24
votes
4 answers

Send Broadcast datagram

I need to send a broadcast datagram to all machine (servers) connected to my network. I'm using NodeJS Multicast Client var dgram = require('dgram'); var message = new Buffer("Some bytes"); var client =…
Wassim AZIRAR
  • 10,823
  • 38
  • 121
  • 174
23
votes
1 answer

Bluetooth broadcasting

I want to broadcast data from one device using Bluetooth to numerous nearby devices. Now, I know Bluetooth broadcasting exists, but is it possible using Android's existing API? If not, are there any other 3rd party APIs available out there which are…
Jong
  • 9,045
  • 3
  • 34
  • 66
21
votes
2 answers

How to correctly filter Package replaced broadcast

I am trying to catch the package replaced broadcast for my app and only my app, but for some reason in my reciever I am the broadcast for every app that is updated. I thought you only needed to set the intent filter in the manifest file to your…
ninjasense
  • 13,756
  • 19
  • 75
  • 92
20
votes
3 answers

Network UDP broadcast design?

I am working on a C++ server/.NET client applications couple in which my server (which runs the c++ on linux) broadcasts a message to show it's alive to the whole network and my .NET program listens for packets and parses to get the uptime of the…
Andrei Zisu
  • 4,292
  • 4
  • 21
  • 32
20
votes
2 answers

Send Broadcast UDP but not receive it on other Android devices

I am trying to develop an app that sends some broadcast messages and receives some answers from the other android devices. I am having some trouble receiving the UDP messages from the other devices. I should mention that this code worked on…
Lara
  • 781
  • 3
  • 8
  • 21
20
votes
1 answer

Python UDP Broadcast not sending

I am trying to UDP broadcast from a Python program to two LabView programs. I cannot seem to get the broadcast to send and I am not sure where my socket initialization is wrong, broadcasting seems simple enough?? As far as I can see, there is no…
TDK
  • 255
  • 1
  • 3
  • 9
20
votes
11 answers

Problems with SO_BINDTODEVICE Linux socket option

I have a PC with two network cards. One (eth0) is for LAN/internet and the other for UDP communication with one microcontroller device. The microcontroller has an IP (192.168.7.2) and a MAC address. The second pc network adapter (eth1) has…
Michael
18
votes
1 answer

boost::asio UDP broadcasting

I want to broadcast UDP messages to all computers in a local network using boost::asio. Working through the examples I came up with try { socket.open(boost::asio::ip::udp::v4()); boost::asio::socket_base::broadcast option(true); …
nikolas
  • 8,707
  • 9
  • 50
  • 70
18
votes
5 answers

Calculate broadcast address from ip and subnet mask

I want to calculate the broadcast address for: IP: 192.168.3.1 Subnet: 255.255.255.0 = 192.168.3.255 in C. I know the way (doing fancy bitwise OR's between the inversed IP and subnet), but my problem is I come from the green fields of…
Kolja
18
votes
6 answers

Turn on screen on device

How can I turn the sceen on ? I tried something like this adb -d shell am broadcast -a android.intent.action.SCREEN_ON It really should work, I send broadcast intent it is received by the system, but the screen doesn't turn on I do not understand…
Lukap
  • 31,523
  • 64
  • 157
  • 244