Using Chat protocols for interpage comms...?

Using Chat protocols for interpage comms...?

by Niall Tracey -
Number of replies: 1

I'm looking to code up a simple module, and I'm not really a back end developer.

Now I want to have my own synchronous comms between two of my pages, and I figure the best way to do that is to use the backend code that's already in place for the real-time chat function.

Basically, it's a very simple version of a real-time whiteboard -- I want to have a master page send a message such as "show_image::" or "play_audio::http//

and have a client page respond by loading and displaying the resource. I already have the page functionality working fine using communication between browser windows on a single client machine. The pages happily run when served from my Moodle instance, and I've incorporated the require_login code. I've tried looking at the Moodle source code on Github, but my PHP is still far too basic to work out which bits are relevant to me and which aren't.

I'm using the Ajax chat at the moment, as I have on-demand hosting with no shell access, so the daemon isn't an option.

Can anyone point me to where in the docs I should be looking at to work out how to do what I'm trying to do here?

Thanks in advance,

Niall.

Average of ratings: -
In reply to Niall Tracey

Re: Using Chat protocols for interpage comms...?

by Niall Tracey -
Apologies for the garbled message examples above. I had put in full (fake) URLs without thinking about the forum software maybe being set up to block those as potential spam.
Basically the message is "show_image::http=//www-site-address/path/filename.jpg" so that the client page can just load arbitrary content for display.