Hello!
I want to build my application with callback interaction. What is it?
For example, when I work with FMS, I use this code:
Server
application.onConnect = function(client)
{
application.accetConnection(client);
client.someServerMethod = function(someData)
{
this.call("someClientMethod");
}
}
Client
var nc:NetConnection;
var nClient:Object;
nClient.someClientMethod = function():void
{
trace("some call from Server");
}
nc.client = nClient;
nc.call("someServerMethod",null, someData);
When client called someServerMethod, server call someClientMethod. I need to do this scheme in Wowza Server.
I don`t want to use Responders on client side
Now I write in my Wowza application next code:
public void someServerMethod(IClient client, RequestFunction function,
AMFDataList params)
{
getLogger().info("someServerMethod called");
}
And when client call someServerMethod, I see in console: WARN server comment - Missing function: someServerMethod
Before in method onConnect i do client.acceptConnection();
And I do not know how to call any method on the client…
Can you talk me about callbacks?