Results 1 to 4 of 4

Thread: Can I appoint a class to handle client calls?

  1. #1

    Default Can I appoint a class to handle client calls?

    There was this topic from 2011 which caught my eye while I was looking for the same thing.
    http://www.wowza.com/forums/showthre...l()-from-Flash

    So, is it possible to specify a class to handle client calls, right now, like we can make this on AS3?

    var callbackHandler:Object = new Object();
    
    var nc:NetConnection = new NetConnection()
    nc.client = callbackHandler;
    I prefer to able specify a handler class but if there is no such thing exists, how should I encapsulate client callback methods from others methods? Or can I simply assume that it is safe the way it is (and there is no pitfalls) while clients can only call methods with specific parameters like this one;

    public void broadcastMessage(IClient client, RequestFunction function, AMFDataList params)
    and they can not call other methods like this one if I place both methods in the BaseModule?
    public void dropAllMembers(String reason)
    Eren
    Last edited by iriscay; 01-06-2014 at 06:14 AM.

  2. #2
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Eren,

    In an Application Module you can use onCall() as a catch-all of any Flash NetConnection.call()

    	public void onCall(String handlerName, IClient client,
    			RequestFunction function, AMFDataList params) {
    		getLogger().info("onCall: " + handlerName);
    	}
    Richard

  3. #3

    Default

    Thank you, Richard.

    I should have noticed this myself instead of focusing on how AS3 handling jobs.

    Eren

  4. #4
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    np, Eren. Glad that helps,

    Richard

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •