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

return makes error in server side apps. #77

Closed ihnevmon closed 12 years ago

ihnevmon commented 12 years ago

Hello,

In server side script placed only a function:

function onConnection(client,response,...) return "hello" end

on client side while connecting happens NetConnection.Connect.Failed event without description instead of NetConnection.Connect.Rejected with description "hello"

but

function onConnection(client,response,...) -- return "hello" end

works fine.

what I did wrong?

Regards, Ice

cumulusdev commented 12 years ago

In the second case, you accept the client. In the first case, yes, you get a "NetConnection.Connect.Failed" but it's not a response of Cumulus, it's a event sent by the client, but just after that, you receive a "NetConnection.Connect.Rejected" with description "hello" (the cumulus response here).

ihnevmon commented 12 years ago

Oh, I see! thanks a lot.