Hi Guillaume,

Guillaume Lecanu schrieb:
> Can you confirm me the calls methods are supported in the 2 ways (server
> to client and client to server) ?

yep, just tested with the current trunk using the following quick-hack
code:

final RTMPClient client = new RTMPClient();
client.connect("localhost", 1935, "echo", new IPendingServiceCallback() {
  public void resultReceived(IPendingServiceCall call) {
    System.err.println("Connected: " + call.getResult());
    client.invoke("echo", new Object[]{"Hello world!"},
      new IPendingServiceCallback() {
        public void resultReceived(IPendingServiceCall call) {
          System.err.println("Received: " + call.getResult());
        }
      });
  }
});

This results in the following being printed out:
Connected: {level=status, description=Connection succeeded.,
code=NetConnection.Connect.Success}
[WARN] 18422 AnonymousIoService-16:(
org.red5.server.net.rtmp.RTMPClient.warn ) Unhandled ping: Ping: 0, 0, -1, -1
00 00 00 00 00 00
Received: Hello world!

The "Unhandled ping" comes from the RTMPClient not knowing what to return
to the server for it and can be ignored for now. However the call works
and the result is returned as expected.

One possible problem with your code is, that you invoke the method before
the client connection has been completely established. You should use a
callback method to detect that similar to how it's done in my example.

Joachim

_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org

Reply via email to