views:

89

answers:

4

What are the various ways I can achieve communication (like function calls) from a web application to a c++ application? I've developed the c++ application to do image processing and want to display and transmit the result in real time to a web-page displayed on a browser.

+2  A: 

Nothing will 'transmit to a web browser'. Web browsers have to ask, and then you can respond with the data you want to display. As per @The MYYN, you can just have the C++ code drop suitable files and the browser can ask for them. Or, you can set up some sort of webapp.

If you use Ajax you can get the browser to poll for things to show and then show them. It's not a simple architecture.

bmargulies
A: 

'Nothing will 'transmit to a web browser'. Web browsers have to ask" - spot on.

Maybe you can use a meta refresh tag in the web page header and use from PHP (or JS, etc, if you must) to query the C++ app each time the page reloads?

Mawg
+1  A: 

Flash has XMLSocket, Silverlight has System.Net.Sockets that allows a server to push data to connected clients.

ento
I'm interested in sample Flash apps for this..how can I use Flash for the UI and c++ for the internal business logic
iceman
A: 

You have quite limited control about how browsers handle resources in a page, so if you have specific requirements that don't fit you should take control of the resources yourself, e.g. by writing a browser-plugin.

With plugins you can fully control what and when you draw and can freely choose how to communicate between server and client. The obvious draw-back is the increased development effort, you should weigh the benefits against that and possibly take compromises like Flash into account.

Georg Fritzsche