Home > Back-end >  How to realize the data synchronization between HTML and C
How to realize the data synchronization between HTML and C

Time:11-28

Problem description:
Way through the SOCKET in the MFC to obtain data from the terminal, and extract the relevant data such as longitude and latitude, in order to realize the map location, need to transfer the data of the longitude latitude to the HTML file, my question is in c + + how to transfer the data into HTML j data updated in real time? Please everyone help solve the trouble, I really appreciate, thank you deeply!

CodePudding user response:

Search Websocket++ open source

CodePudding user response:

Don't quite understand your means! What is a c + + the data is passed to the HTML, HTML is a static document, and is not a program, how can you accept? The meaning of the original poster is written in c + + program to modify the HTML? If so, you find directly to the place you want to modify directly modify is ok

CodePudding user response:

Or want to c + + programs, to update your browser to display data?? This is going to deal with a browser, Windows should have corresponding API can be invoked, baidu search,

CodePudding user response:

Use the WebBrowser control,

CodePudding user response:

quoted zhao 4, 4/f, the teacher's reply:
use WebBrowser control,

Thank you, thank you for your guidance,

CodePudding user response:

We now demand for a product with you completely consistent, the background is a c + +, with the front end by websocket js communications, data exchange between the json format, again by js changing the web page to reflect the data change,

CodePudding user response:

Search "VC interact with JavaScript (a)"?

CodePudding user response:

refer to 6th floor tofu_ response:
we now demand for a product with you completely consistent, the background is a c + +, with the front end by websocket js communications, data exchange between the json format, again by js changing the web page to reflect the data change,

I have achieved, through the Webbrowser and Cwebpage this two controls, in the second control implementation mobilized js function to exchange data and js

CodePudding user response:

The problems described,,
Data transmission is not,,
Web server directly using websocket, ajax, HTTP request and so on, directly to the service side pick line ah,

CodePudding user response:

C + + server written in js socket connection

CodePudding user response:

How the specific implementation, I found the MFC embedded web content, IE many JS can support,
  • Related