How do I communicate between C++ and Flash? - c++

Is there any way I can have an integration between Flash AS and C++? Let's say I have created a socket using C++ and multi-casting it to several ip addresses.
On one of the IPs I am running a Flash client. Can I receive the Multicast message (sent by MFC/C++ application) through my Flash application.
Or at least can I develop a Flash plugin (menu item) using C++?
The main objective is I just need to get my hands on anything that shows the communication/interaction between C++ and Flash.

Depends on what you would like to do. If you host the swf's in your application you can use the ExtenalInterface in flash via the ActiveX container. http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/external/ExternalInterface.html
We are using that method in our project, check it out (open source): http://www.casparcg.com/
If you want to talk to swf's outside your application Sockets would do the job I guess.
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/Socket.html

Related

UWP application refuses to receive data in P2P server part

I am trying to create P2P(UDP) windows 10 UWP application written in c++ using networking library written in C (tried both enet and libuv).
The problem is when the app is acting like client everything works as expected, but when I am testing the server part the application refuse to receive any events (connection in enet and messages from libuv). I tried the code from simple console applications and it works for both enet and libuv!
Also I added rules in the firewall to allow everything on the default port.
My question is, do I need to make additional configurations for the UWP application for receiving?
According to your description on your same thread in MSDN, the server and the client are on the same device.
According to the note of DatagramSocket official sample:
Network communications using an IP loopback address cannot normally be used for interprocess communication between a Universal Windows Platform (UWP) app and a different process (a different UWP app or a desktop app) because this is restricted by network isolation.
We cannot communicate a uwp app with other apps in a same machine. Not even with a loopback exemption. This is as design. If you use a c# console project as server and a uwp app as client, they may communicate successfully. But it need special steps (E.g. run the console as administrator) to let it work which you may happen to meet the requirements. Details you can reference this thread.

Application specific network interface in CEF3 based application

I am writing a CEF3 based application. I have a requirement, where I can show available network interface and select any of them. Once I have selected the network interface all the traffic should route through that selected network interface. For example if I am having one Ethernet one wifi and one 3G network interface available in my system. and all communication is going through the default which is Ethernet. Now If I select wifi from the application, All communication within the application should go through wifi.
I searched a lot over net and figured out that using bind() function we can bind a specific IP address for communication. But, How can I achieve it in CEF3?
I am new to CEF3 and never written any networking software.
I have already gone through below links-
Using a specific network interface for a socket in windows
https://www.raymond.cc/blog/bind-windows-application-to-specific-network-adapter-with-forcebindip/
TCP/IP connection on a specific interface
I am writing cef3 application in win32/c++ so looking for the same.

I need a Windows 8 WinRT application to communicate with a standalone application written in C

I have 2 application running on the same machine.
Editor, is a Windows 8 application developed with WinRT and is sand-boxed. (Client)
Integrator is a C++ application for reading hardware devices over serial COM ports. (Server)
I have done a lot of searches about how to get client/server communication to work on Windows 8,
and can only find posts that say it is not possible using standard WinRT classes, etc.
What I need is a solution where by the Windows 8 application works as a client, and the standalone
executable works as a server.
Can someone please suggest a mechanism that can be used to do client/server communication.
If we cannot find a good solution for this, then we will have to resort to using files, which
I would rather not have to do.
Clarification: I am aware of the many mechanism that can be used to do client/server communication.
What I am looking for is a workaround to the problem, where the these techniques will not work on
a Windows 8 application, developed with WinRT. As the sand-boxing explicitly prohibits the client
and server being on the same host machine.
Well, the posts stating that such communication is not possible, are mostly right. There are 2 reasons, why this is prevented:
Being able to communicate to an application outside the sandbox effectively breaks the sandbox. The Windows Store app is now suddenly able to do everything the desktop application can do: access file system, registry... Windows Store apps live in a sandbox for reason - to be safe for the user.
The Windows Store app won't work after it is installed from the the store or from a package. It needs to have a desktop application installed and set up correctly as well.
I would suggest you try to move your server part to a different machine and make it a proper server. If for some reason you really can't do that, you still have the following options available:
You can use TCP/IP to connect local network resources if you remove the isolation for your Windows Store app. You will need to use CheckNetIsolation.exe, but since you already need to separately install the desktop application, this shouldn't be that much of a problem.
You can create files with a specific extension. Then register the desktop app for one extension and the Windows Store app for another extension. You can now shell execute files with these extensions to use them as a message for the other app.

Send midi data over a network from inside a host

How could I send MIDI data received be a VST from inside a Host application (Cubase, for example) over LAN to another computer in the network?
The VST plugin framework does not include an inbuilt solution to send MIDI from one plugin to another. It also goes against the assumption of what VST plugins do. Generally VST plugins only communicate with the host application. It is assumed they will not communicate with other plugins or applications.
That being said you could use OSC (Open Sound Control) and whatever TCP/IP networking library you are comfortable with.
not c++ but java - it is the closest thing i know of though:
oscvstbridge

Detect devices on local network for client-server connection in C++

I'm trying to implement an auto-connect feature for my Android application DroidPad, which is basically a TCP server running on an Android phone which the PC application connects to.
To make the process easier for the user, is there any way in (portable?) C++ to scan the IP addresses on the local subnet, possibly ones with a certain open port? I've tried using UDP broadcasting, but couldn't get it to work. I'm currently using the wxWidgets toolkit for GUI and libraries.
Any ideas?
I found a solution: wxServDisc. It uses mDNS (aka Zeroconf / Bonjour) to discover devices on a subnet, and is also based on wxWidgets.