PDA

View Full Version : Client to Client Call


FX KILL
03-30-2009, 03:38 PM
I've been searching on google to find how to do this, but I must be thinking the wrong technical term for it.

I'm wondering if it is possible to have one client call to the server, the server then relaying that call to another client to run a function.

That function could run a popup window with a accept or deny invite to, say a video conference.

Thanks in advance.

FX KILL
03-30-2009, 07:38 PM
I think I may have stumbled upon what I'm looking for, while trying to use SharedObjects along with Red5. Hopefully I can solve this now with some time, I'll post the solution if I get this working.

Hyakkidouran
03-31-2009, 01:10 PM
Hi,

I worked on a project where I had to do that. I have some trouble converting said project to AS3, but in AS2 it worked and I am sure it could also in AS3...

Here is the idea :
-in the server-side script, create an array or associative array (object class).
-when a client connects, put its "client" object (parameter of "onConnect") in the array.
-Thanks to the Array, you can call functions on any client with just : MyArray[clientId].call().

You can then send a list of clients to all users containing theirs clientId. If a client want to contact another, he will call a function that will look like :

function relayDemand( clientId ) {

MyArray[clientId].call( "my function" ).

}