broadcast

Listening to a UDP broadcast

房东的猫 提交于 2019-12-06 16:53:11
I need to listen to a network broadcast coming over UDP. The datagram contains a j4cDAC_broadcast struct. I have tried following a few tutorials, but they seem to have left a few things out and dont have very detailed explanations, if any. With what I have right now I am getting an error BIND FAILED 10049 and error 10049 indicates that the address is unavailable. The broadcast is coming in on 255.255.255.255:7654. How do I fix this error? This is what I have so far: void test() { WSADATA wsd; SOCKET s; j4cDAC_broadcast recieve; char *read = (char*) malloc(sizeof(j4cDAC_broadcast)); int ret;

API to broadcast live webcam

╄→гoц情女王★ 提交于 2019-12-06 15:47:47
I would like to know if anyone here knows an API where it's possible for me to create a live webcam broadcast from inside my website? I was checking the uStream API and it seems that you can't create anything, just retrieve data... Does anyone knows anything like this? Thanks in advance! you can use Flash Media Server or Flash Comm Server and code in actionscript to connect to the server for live streaming. AS3 has got inbuilt support for web cam programming using Flash Communication Server/Media Server. See Basics of video at adobe.com 来源: https://stackoverflow.com/questions/257364/api-to

C# UDP broadcast client/server does not work

爱⌒轻易说出口 提交于 2019-12-06 12:59:51
问题 I'm using .NET 2.0 and have created a fairly simple udp broadcast app and UDP listener. Listener code: Socket listener = new Socket( AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp ); IPEndPoint localEndPoint = new IPEndPoint( IPAddress.Any, 11000 ); listener.Bind( localEndPoint ); EndPoint ep = (EndPoint)localEndPoint; Console.WriteLine("Ready to receive…"); byte[] data = new byte[1024]; int recv = listener.ReceiveFrom(data, ref ep); string stringData = Encoding.ASCII

Detect day change event in broadcast receiver in android

北城余情 提交于 2019-12-06 08:44:37
问题 I want to implement a feature in android app which execute a particular code when ever there is a date change(at 00:00AM) even when my app is not running. 回答1: I might be late answering this question, but I personally faced the same problem. For day change, you can simply use a broadcast receiver with action "android.intent.action.DATE_CHANGED", and it will trigger whenever the date is changed (either implicitly or explicitly by user). I hope this will help someone who gets to here through

.NET Options Stream Video Files as WebCam Image

梦想的初衷 提交于 2019-12-06 07:51:59
I am interested in developing an application that will allow me to build a list of videos from xml (containing video title, duration, etc) and play that list as my webcam stream. Meaning, if I were to visit ustream.tv, or activate my webcam on live messenger my video playlist would register as my active webcam. Does anybody have experience in this area, and perhaps have some advice to offer? I don't have a lot of experience in this area, but I would start by looking at the MSDN docs for the DirectShow API . A couple of .NET wrapper libraries exist as well: Managed DirectShow DirectShow.NET

Pendingintent getbroadcast lost parcelable data

爱⌒轻易说出口 提交于 2019-12-06 05:01:29
问题 Here is the problem. My program is running perfect in Android 6.0. After update the device to android 7.0. Pendingintent can not pass the parcelable data to boradcast reveiver. Here is the code. Fire the alarm public static void setAlarm(@NonNull Context context, @NonNull Todo todo) { AlarmManager alarmManager = (AlarmManager) context.getSystemService(context.ALARM_SERVICE); Intent intent = new Intent(context, AlarmReceiver.class); intent.putExtra("KEY_TODO", todo); PendingIntent alarmIntent

Network Discovery of an application for peer to peer network

左心房为你撑大大i 提交于 2019-12-06 04:41:48
I wish to have two classes, a server class and a client class. The server class should recieve the IP address and Port number of each new client and store them in a list. It should supply each of the clients with a list of connected clients and their IP addresses. The clients could then communicate with each other using TCP connections. The catch is that the clients won't know what the IP address of the server is. The entire program will however run on a local area network. My guess is that it needs some sort of UDP broadcast, but every time I try to impliment this it doesn't work unless the

How to make activity react to local Broadcasts while paused?

戏子无情 提交于 2019-12-06 03:40:48
What is the best way to make an activity (if there is any) react to a broadcast that was send over a LocalBroadcastManager while the activity was paused or stopped. I couldn't find much details if the LocalBroadcastManager differs from a normal broadcast, but it seems that is still gets called event if the activity is in background. But that leads to some problems since some UI modifications are not possible as long as the activity is not shown. That's why I would prefer to handle all broadcasts when the activity gets back to top. But how can I do this. I was thinking of a queue that will take

Java DatagramSocket listening on a broadcast address

别等时光非礼了梦想. 提交于 2019-12-06 03:11:14
问题 I have written the simple test class which is meant to listen on Eth and receive all UDP packets, which go to port 5001 : public class Main { public static void main(String[] args) throws SocketException, UnknownHostException, IOException { DatagramSocket socket = new DatagramSocket(5001, InetAddress.getByName("255.255.255.255")); socket.setBroadcast(true); System.out.println("Listen on " + socket.getLocalAddress() + " from " + socket.getInetAddress() + " port " + socket.getBroadcast()); byte

Android Communication between Broadcast Receiver and MainActivity (Send data to activity)

谁说胖子不能爱 提交于 2019-12-06 03:07:11
问题 I've a simple Main Activity which has to stop till an SMS is received... How can I launch a method from the MainActivity within the BroadcastReceiver 's onReceive() Method? Is there away with Signal and Wait? Can I pass something with a pending Intent , or how can I implement this communication? 回答1: Communication from BroadcastReceiver to Activity is touchy; what if the activity is already gone? If I were you I'd set up a new BroadcastReceiver inside the Activity, which would receive a CLOSE