0

I have a client application in flash and a server application in C++ on linux. They communicate through a TCP socket and the server handles all of the game logic and communication between clients.

I'm now in the process of deploying my application onto a website. Embedding the swf is easy and working fine.

I want to be able to save statistical information about users and would like to use the Facebook login to uniquely identify users and store information about them in the mysql database.

I am now in a situation in which the javascript part of my server application (index.html using apache) needs to send the facebook information to the C++ part of my server (which contains all of the game logic and database management) so that I will know a users unique ID for the database.

Is it possible to send this information from Javascript to the C++ application?

1 Answer 1

1

You can make your C server act as a webserver, accepting connections following the HTTP protocol, and then you can send data with Ajax. Just remember to make your server send the Access-Control-Allow-Origin: yourdomain.com response header, replacing yourdomain.com with the domain you host the HTML+JS page on; this is to allow cross site requests, because the C server will be listening on another port than the webserver, and maybe another address too.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.