OpenRTMFP / Cumulus

CumulusServer is a complete open source and cross-platform RTMFP server extensible by way of scripting
http://groups.google.com/group/openrtmfp-cumulus
GNU General Public License v3.0
593 stars 221 forks source link

Method 'hello' not found #74

Closed starjiang closed 12 years ago

starjiang commented 12 years ago

1.function hello in onConnection,can be called by flash client function onConnection(client,response,...)

function client:hello(...)
         return "helloword"
end

end

2.fuction hello not in onConnection can not be called by flash client,why? function onConnection(client,response,...)

end

function hello(...) return "helloword" end

cumulusdev commented 12 years ago

Because it has been chosen like that :-)

A "RPC" function have to be a member of client object. It allows to select precisely your functions callable by client, and what are client authorized to have these RPC functions (security exigency). By this way, it sounds logic because it avoids the "client" argument in the RPC function (same function signature on server and client side).

starjiang commented 12 years ago

thanks

------------------ 原始邮件 ------------------ 发件人: "cumulusdev"; 发送时间: 2012年6月6日(星期三) 下午4:13 收件人: "starjiang"82776315@qq.com; 主题: Re: [Cumulus] Method 'hello' not found (#74)

Because it has been chosen like that :-)

A "RPC" function have to be a member of client object. It allows to select precisely your functions callable by client, and what are client authorized to have these RPC functions (security exigency). By this way, it sounds logic because it avoids the "client" argument in the RPC function (same function signature on server and client side).


Reply to this email directly or view it on GitHub: https://github.com/OpenRTMFP/Cumulus/issues/74#issuecomment-6145237