我正在尝试创建一个将连接到FluorineFx RTMP服务的.NET使用者客户端。 创建Flex消费者客户端非常容易,我希望在.NET中创建相同的
(换句话说,如何将MessageAdapter连接到MessageAdapter?)
非常感谢,
杜迪·
答案 0 :(得分:2)
我正在使用NetConnection对象,对我来说效果很好。查看documentation page:
using FluorineFx.Net;
...
NetConnection netConnection = new NetConnection();
netConnection.OnConnect += new ConnectHandler(netConnection_OnConnect);
netConnection.NetStatus += new NetStatusHandler(netConnection_NetStatus);
netConnection.Connect("rtmp://localhost:1935/HelloWorld");
...
void netConnection_OnConnect(object sender, EventArgs e)
{
//The NetConnection object is connected now
netConnection.Call("serverHelloMsg", new ServerHelloMsgHandler(), "some text");
}
...
void netConnection_NetStatus(object sender, NetStatusEventArgs e)
{
string level = e.Info["level"] as string;
}
...
//Our result handler object
public class ServerHelloMsgHandler : IPendingServiceCallback
{
public void ResultReceived(IPendingServiceCall call)
{
object result = call.Result;
}
}