How to create a Consumer .NET client using FluorineFx?

2.7k views Asked by At

I'm trying to create a .NET consumer client that will connect to a FluorineFx RTMP Service. It was very easy to create a Flex consumer client and I wish to create the same in .NET

(In other words how to connect a MessageAdapter to MessageAdapter?)

Many Thanks,

Dudi

1

There are 1 answers

0
Pedro Laguna On

I'm using the NetConnection object and works fine for me. Check the 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;
    }
}