broadcast

How can chrome.socket be used for broadcasting or multicasting?

亡梦爱人 提交于 2019-12-04 11:50:24
问题 I want to create a Chrome Packaged App used for LAN only, where one instance serves as a server (session host) and other instances must discover the server and join the session. Can this be achieved with chrome.socket? I have set up the server like this: var socket = chrome.socket || chrome.experimental.socket; socket.create('udp', {}, function(createInfo) { var publish_socket = createInfo.socketId; socket.bind(publish_socket, '225.0.0.42', 42424, function (result) { if (result < 0) console

Phone doesn't send all stored ssids while capturing Wi-Fi probe wequests

你。 提交于 2019-12-04 08:15:50
I build a script with scapy to capture probe requests in a monitornig wi-fi interface. I successfully capture the requests, and some of the SSIDs contained in them. But most of the networks stored in the phone don't get broadcasted. And there isn't a clear pattern of why this happens. Some phones don't broadcast ssids at all. I'm trying to find an explanation for the reasoning behind this behaviour, but haven't found any, apart that the hidden networks should be broadcasted in order for the phone to connect to them, but even that is not true, and most of the broadcasted ones are visible.

$watch a service variable or $broadcast an event with AngularJS

橙三吉。 提交于 2019-12-04 06:55:57
I'm using a service to share data between controllers. The application has to update the DOM when a variable is modified. I've found two ways to do that, you can see the code here: http://jsfiddle.net/sosegon/9x4N3/7/ myApp.controller( "ctrl1", [ "$scope", "myService", function( $scope, myService ){ $scope.init = function(){ $scope.myVariable = myService.myVariable; }; }]); myApp.controller( "ctrl2", [ "$scope", "myService", function( $scope, myService ){ $scope.increaseVal = function(){ var a = myService.myVariable.value; myService.myVariable.value = a + 1; }; }]); http://jsfiddle.net/sosegon

BroadcastHub filtering based on “resource” the connected client is working on?

早过忘川 提交于 2019-12-04 06:03:45
I am writing a pure websocket web application, meaning that prior to the websocket upgrade there is no user/client step, more specifically: Authentication request goes over websockets as does the rest of the communication There is/are: Exactly ONE websocket endpoint on /api/ws Multiple clients connected to that endpoint Multiple projects for multiple clients Now, not each client has access to each project - the access control for that is implemented on the server side (ofc) and has nothing to do with websockets per se. My problem is, that I want to allow collaboration, meaning that N clients

Reliable udp broadcast libraries?

别说谁变了你拦得住时间么 提交于 2019-12-04 04:57:45
问题 Are there any libraries which put a reliability layer on top of UDP broadcast ? I need to broadcast large amounts of data to a large number of machines as quickly as possible, and generally it seems like such a problem must have already been solved many times over, but I wasn't able to find anything except for the Spread toolkit, which has a somewhat viral license (you have to mention it in all materials advertising the end product, which I'm not sure our customer will be willing to do). I

Connecting a Docker container to a network interface / device instead of an IP address

别等时光非礼了梦想. 提交于 2019-12-04 04:14:35
After careful research, testing, and fiddling, I've only been able to find away to connect a Docker container to a given interface by forwarding from an IP/port. This can be accomplished by adding -p Host-IP:Host-Port:Container-Port to a docker run command. I have an app that listens for UDP broadcasts (255.255.255.255), and have been unable to configure forwarding in such a way that my container will receive those broadcasts without forwarding all network traffic on the port I care about (no matter through which interface it comes in), ie: -p Host-Port:Container-Port . It's possible to

receiving UDP packets send to 127.0.0.1 when using SO_REUSEADDR

最后都变了- 提交于 2019-12-04 03:46:14
I am trying to make a set of applications discover each other using UDP and broadcasting messages. The applications will periodically send out an UDP packet saying who they are and what they can do. Initially we only use to broadcast to INADDR_BROADCAST. All applications share the same port to listen to (hence the SO_REUSEADDR). An event kernel object is attached to the socket so we get notified when we can fetch a new packet and use that in a WaitFor loop. The socket is used async. Opening the socket: FBroadcastSocket := socket( AF_INET, SOCK_DGRAM, IPPROTO_UDP ); if FBroadcastSocket =

AngularJs/ .provider / how to get the rootScope to make a broadcast?

若如初见. 提交于 2019-12-03 22:43:49
Now my task is to rewrite $exceptionHandler provider so that it will output modal dialog with message and stop default event. What I do: in project init I use method .provider: .provider('$exceptionHandler', function(){ //and here I would like to have rootScope to make event broadcast }) standart inject method does not work. UPD : sandbox - http://jsfiddle.net/STEVER/PYpdM/ You can inject the injector and lookup the $rootScope. Demo plunkr: http://plnkr.co/edit/0hpTkXx5WkvKN3Wn5EmY?p=preview myApp.factory('$exceptionHandler',function($injector){ return function(exception, cause){ var rScope =

UDP broadcast in C

柔情痞子 提交于 2019-12-03 17:11:57
When I broadcast a message by the code below, the server on the host machine also receive the message, how can I prevent host machine to receive the message that it sends? Is it possible to change something on the code or would it be better to use something like if (strcmp(hostIP == IP_of_the_package) == 0) { <discard the msg>} ? the host machine gets IP from DHCP, how can I define hostIP as a variable and How can I extract IP addr of the packet ? void boardcast_msg(char *mess){ int sock; struct sockaddr_in broadcastAddr; char *broadcastIP; unsigned short broadcastPort; char *sendString; int

Receive UDP in Android Marshmallow

北城余情 提交于 2019-12-03 16:14:29
I'm having problems to receive constantly the UDP packets from the server with new Nexus 5X (Marshmallow) I have another real devices that receive all UDP packets, but it seems that something changed in Android API 23. CODE: Anyone with the same problem? if (s == null || s.isClosed()){ Log.v("udp", "----------------------------------------------------new socket---------------------------------"); s = new DatagramSocket(null); s.setReuseAddress(true); s.setBroadcast(true); s.setSoTimeout(5000); s.bind(new InetSocketAddress(8002)); p = new DatagramPacket(message, message.length); try{ Thread