Skip to main content
August 13, 2009
Question

NetConnection - Multiple "clients"

  • August 13, 2009
  • 1 reply
  • 4150 views

Hi all,

  Let's say I have two different Flash apps (remote from each other) and joined by the same NetConnection.  Now, they both set the NetConnection "client" property (e.g. nc.client = <whatever>".  On one of the apps (the one I incidentally start first), it receives all remote "client" calls from the script sitting on my Flash Media Server.  However, the second app (which sets the .client property in the same way) never receives ANY of those client calls.

  Is it possible to have more than one custom "client" set for a NetConnection?  Or am I missing something here?

  Thanks in advance!

Cheers,

Duncan

    This topic has been closed for replies.

    1 reply

    Participating Frequently
    August 14, 2009

    I dont think its possible to have two clients on same netconnection. In real sense, a client is nothing but a netconnection and its one to one mapping. I think you are not stating your problem correctly. Can u pass me the code and what is your objective , then probably i might be able to help you.

    August 14, 2009

    I promise you I'm stating my problem correctly.

    Each Flash app has a NetConnection to the same FMS (same FMS application, same port, etc.).  But, if you're telling me there can only be one "client" set per FMS application, then please confirm that.

    Here's the code used on both ends (essentially):

    (from the init() method in the client:)

    ...

      nc = new NetConnection();
      rtmpGo="rtmp://whatever/wherever";

      var ph:ProxyChatRequest = new ProxyChatRequest();
      ph.addEventListener("finalizeEvent", handleFinalize);
      nc.client = ph;

      nc.connect();
    ..

    where "nc" is a NetConnection object.  ProxyChatRequest is simply an extra class that handles the NetConnection callbacks.  It works on one Flash app but not the other.

    Thanks again.

    Participating Frequently
    August 14, 2009

    No I don't mean there can be only one client to FMS application. What i meant is you can one client per netconnection , not single client to FMS app. Now if both clients are two different swf's each having its own NetConnection , that callbacks should happen for both clients. Is it possible for you to share both your server-side and client-side code?