|
|
Rank: Newbie Coder Groups: Member
Joined: 3/13/2012 Posts: 2 Points: 3
|
Hello,
I have an issue with the new library (2/26) when trying to invoke a method in the server using this code:
NSMutableArray *args = [NSMutableArray array]; NSString *method = [NSString stringWithString:@"GetUserName"]; [args addObject:[NSString stringWithString:@"name!"]]; [socket invoke:method withArgs:args];
and here's the server method:
newClient.GetUserName=function(Name) { trace("------------------>>> "+"begin update") }
The same code worked correctly using the old library. Is there anything that I need to change in my code (server or client)? I'm always getting "Unknown * command issued for stream 1" error.
|
|
 Rank: Apprentice Coder Groups: Member
Joined: 3/23/2012 Posts: 30 Points: 87 Location: Kiev, Ukraine
|
Hi Basel, In last releases of CommLibiOS the signature of invoke method has been changed. Now you MUST specify a responder for invocation result. The responder is an instance of AsynCall class declared in RTMPClient.h. In your sample, you should implement the method, for example : -(void)onGetUserName:(id )call { NSArray *args = [call getArguments]; id result = (args.count) ? [args objectAtIndex:0] : nil; NSLog(@"onEchoInt = %@\n", result); }
and use @selector(onGetUserNamet:) when AsynCall instance will be created.
NSMutableArray *args = [NSMutableArray array]; NSString *method = [NSString stringWithString:@"GetUserName"]; [args addObject:[NSString stringWithString:@"name!"]]; [socket invoke:method withArgs:args responder:[AsynCall call:self method:@selector(onGetUserNamet:)]];
When response has been received, onGetUserName method will be executed.
For more information, see demo app ClientInvoke from package CommLibDemos.zip (http://www.themidnightcoders.com/download.html).
Regards, Slava
______________ Slava Vdodichenko Midnight Coders, Inc. slavav@themidnightcoders.com
|
|
Rank: Newbie Coder Groups: Member
Joined: 6/25/2012 Posts: 2 Points: -285
|
hi slavav
i get the error code in fms Unknown echoInt command issued for stream 1 (application ClientInvoke/_definst_). Unknown echoFloat command issued for stream 1 (application ClientInvoke/_definst_). seem the connect is fine and the "[rtmpClientInstance invoke:method withArgs:args]'; is fine but the "responder:[AsynCall call:self method:@selector(onResult:)]" seem get some problem.
i use your demolibdemos 2.3 2.2 and 2.0 in the your wowza server is fine
i see the youtube is work. but i try to use the fms4.0 and 4.5 server it always unable and show the same error code seem the
my xcode is 4.3.2 and the server code is download the MethodInvocation-servercode.zip client is using your demolibdemos
did i do any thing less? or you have any suggest?
thanks.
|
|
Rank: Newbie Coder Groups: Member
Joined: 7/2/2012 Posts: 5 Points: 15
|
Hello,
I have the same problem as twofishsman using Flash Media Server 4.5.
Any hint would be appreciated as this is a show stopper in my game development, thanks !
@twofishsman, did you find a solution ?
|
|
 Rank: Apprentice Coder Groups: Member
Joined: 3/23/2012 Posts: 30 Points: 87 Location: Kiev, Ukraine
|
Hi, fenryll, twofishsman, For executing ClientInvoke & ServerInvoke demo apps from CommLibiOS.zip you need to install the some server-side apps at your fms server, as it's described in http://www.themidnightcoders.com/rtmpdemosetup.Slava The Midnight Coders, Inc.
|
|
Rank: Newbie Coder Groups: Member
Joined: 7/2/2012 Posts: 5 Points: 15
|
Hello,
I am about to purchase the lib, but...
this is a show stopper for me, and the lack of answer / support images me unsecured..
Who can help ? I have this feature to see working, and also (still have to test) the client call to remote sharedObjects method..
|
|
Rank: Newbie Coder Groups: Member
Joined: 7/2/2012 Posts: 5 Points: 15
|
slavav wrote:Hi, fenryll, twofishsman, For executing ClientInvoke & ServerInvoke demo apps from CommLibiOS.zip you need to install the some server-side apps at your fms server, as it's described in http://www.themidnightcoders.com/rtmpdemosetup.Slava The Midnight Coders, Inc. Hi Slava, As twofishsman, I am running FMS (Flash Media Server) on the server side, the link you posted is the setup for WebORB. Anyway, in the CommLib demo package, there is the server side action script "classes" for FMS, most of them are working, except the ClientInvoke .. :(
|
|
 Rank: Apprentice Coder Groups: Member
Joined: 3/23/2012 Posts: 30 Points: 87 Location: Kiev, Ukraine
|
Hi everybody, I've fixed the problem with invocation on fms, you can get lib & demo from github - https://github.com/slavavdovichenko/CommLibDemosSlava
|
|
|
Guest |