views:

322

answers:

2

Hi All,

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

A: 

Hi, 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;
    }
}
Pedro Laguna
A: 

Hi Pedro - thank you for your post.

However, I'm looking to implement the flex consumer in .net and not the Flash NetConnection (which was working for met too).

Think about the following scenario - I have a web site that uses the MessageBroker to broadcast messages to all clients and some of the clients are flex (using the Consumer class) and some of them are .net.

I looked deeply into the documentation but could not found anything.

Do you have any other idea?

Thanks,

Dudi

Dudi