
|
If you were logged in you would be able to see more operations.
|
|
|
| Severity: |
Minor
|
| Runtime: |
N/A
|
| Fix in hand: |
False
|
|
There is still a issue to solve with the rtmpconnection:
How to handle server-side calls which are not mapped by the client.
Simple szenario
The server (I'm using Red5) broadcast a message to the client *without* invoking by the client.
atm the rtmpconnection-class only hanldes server-side calls if they have been invoked by the client.
for example:
<netremotecall name="getList" funcname="demoService.getListOfAvailableFLVs">
<method name="onResult" args="value">
</method>
</netremotecall>
This will work! the server side response will be mapped to the *onResult* method (btw should this be changed to the new *handler* syntax of OpenLaszlo cause it may be confusing to use a *on[whatever]* function with the *old* method syntax instead of the *handler* syntax)
*but*
if the server broadcasts messages *without* invoking it by the client atm they can only by catch by the following syntax:
// This is the way a function is called by the remote Interface has
// to be implemented ...
/**
this._nc.setId = function(id){
_root.Debug.write("########## Method called by rtmp Server");
_root.Debug.write("---------------> id: ",id);
}
**/
this should by removed by a more clear syntax which is more like OpenLaszlo does handle methods/handlers.
The problem so far is:
How to catch server side calls?
What i think about is, or what would be very helpfull is a message in the debugger:
*ERROR: rtmp-connection calls method *whatever* which is not mapped to a function*
This is quite important issues cause is enabled asynchron client-server communication which is very common/usefull is Application like chats/instan messangers/mail-clients/games
The *NetConnection Debugger* does it with the *__resolve* function (which is I think a internal FlashPlayer function you can find some docs on MM-Livedocs.
So there are two things to solve:
1) get an event that is invoked if server calls a method assynchron
2) map server-side calls to method (could be done quite easily by register avery *netremotecall* to the rtmpconnection-Object)
3) if there is no function mapped write an error to the Debug
|
|
Description
|
There is still a issue to solve with the rtmpconnection:
How to handle server-side calls which are not mapped by the client.
Simple szenario
The server (I'm using Red5) broadcast a message to the client *without* invoking by the client.
atm the rtmpconnection-class only hanldes server-side calls if they have been invoked by the client.
for example:
<netremotecall name="getList" funcname="demoService.getListOfAvailableFLVs">
<method name="onResult" args="value">
</method>
</netremotecall>
This will work! the server side response will be mapped to the *onResult* method (btw should this be changed to the new *handler* syntax of OpenLaszlo cause it may be confusing to use a *on[whatever]* function with the *old* method syntax instead of the *handler* syntax)
*but*
if the server broadcasts messages *without* invoking it by the client atm they can only by catch by the following syntax:
// This is the way a function is called by the remote Interface has
// to be implemented ...
/**
this._nc.setId = function(id){
_root.Debug.write("########## Method called by rtmp Server");
_root.Debug.write("---------------> id: ",id);
}
**/
this should by removed by a more clear syntax which is more like OpenLaszlo does handle methods/handlers.
The problem so far is:
How to catch server side calls?
What i think about is, or what would be very helpfull is a message in the debugger:
*ERROR: rtmp-connection calls method *whatever* which is not mapped to a function*
This is quite important issues cause is enabled asynchron client-server communication which is very common/usefull is Application like chats/instan messangers/mail-clients/games
The *NetConnection Debugger* does it with the *__resolve* function (which is I think a internal FlashPlayer function you can find some docs on MM-Livedocs.
So there are two things to solve:
1) get an event that is invoked if server calls a method assynchron
2) map server-side calls to method (could be done quite easily by register avery *netremotecall* to the rtmpconnection-Object)
3) if there is no function mapped write an error to the Debug |
Show » |
|
so that could be a fix for problem 1) and 2)
I don't know about server callbacks.
It works with red5 (0.5 + 0.6)
to Problem 4) *what if there is no funtion mapped to a server side call*
Red5 will throw a debug message that the function can't be found, is FMS doing the same?