下面的这个实例是在本地(ClIEnt与Server位于同一机器上)测试的。
1 Server-sIDe 1.1 Server configuration:; CumulusServer.ini port = 1935udpBufferSize = 114688keepAlivePeer = 10keepAliveServer = 15[logs]name = logdirectory = logs1.2 Application file:
function onConnection(clIEnt,response,...) function clIEnt:test(...) name,firstname = unpack(arg) return "Hello "..firstname.." "..name endend2 ClIEnt-sIDe
// CumulusClIEnt.aspackage { import flash.display.Sprite; import flash.net.NetConnection; import flash.net.NetStream; import flash.net.Responder; public class CumulusClIEnt extends Sprite { private var nc:NetConnection = null; private var ns:NetStream = null; public function CumulusClIEnt() { nc = new NetConnection(); nc.connect("rtmfp://localhost"); nc.clIEnt = this; nc.call("test",new Responder(onResult,onStatus),"OpenRTmfp/Cumulus","World") } public function close():voID { nc.close(); } public function onStatus(status:Object):voID { trace(status.description) } public function onResult(response:Object):voID { trace(response) // expected to display "Hello World OpenRTmfp/Cumulus" } }}3 运行结果
Hello World OpenRTmfp/Cumulus[SWF] CumulusClIEnt.swf - 解压缩后为 1,776 个字节[卸装 SWF] CumulusClIEnt.swf4 远程测试:一个免费的测试服务器
获取 Developer Key 的地址:
http://108.59.252.39:8080/CumulusServer/index.Jsp
服务器配置信息:
Server: amd64 OS: linux 2.6.18-028stab095.1Server IP: 108.59.252.39OpenRTmfp as of: 22.Feb.2012
编写服务器段应用地址:
http://108.59.252.39:8080/CumulusServer/manage_ssls.Jsp
快去试试吧 :)
-
转载请注明来自柳大的CSDN博客:Blog.csdn.net/poechant
-
总结以上是内存溢出为你收集整理的OpenRTMFP/Cumulus Primer(2)用Lua编写HelloWorld应用扩展CumulusServer全部内容,希望文章能够帮你解决OpenRTMFP/Cumulus Primer(2)用Lua编写HelloWorld应用扩展CumulusServer所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)