Re: Client side AMF

View: New views
5 Messages — Rating Filter:   Alert me  

Re: Client side AMF

by Duder Himer :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Since:
            var messageToSend:* = new Object();
            messageToSend.cmd = cmdStr;
            messageToSend.data = objectData;
...would be an associate array with the cmd and data elements, what would that look like on the C# side?  What C# object do associative array come across as?

From: Duder Himer <websnozz@...>
To: Fluorine Mailing List <fluorine@...>
Sent: Tuesday, September 1, 2009 6:19:48 AM
Subject: Re: [Fluorine] Client side AMF

Well #1 is a snippet of the legacy code, which I am porting over.  I'd prefer the easiest method, but it will need to be equivilant.  I am messing with the NetConnection API now.  I am only guessing that the legacy code is maybe some hacked together version of RTMP since a socket is being used.


From: Support <support@...>
To: Fluorine Mailing List <fluorine@...>
Sent: Tuesday, September 1, 2009 5:58:32 AM
Subject: Re: [Fluorine] Client side AMF

The FluorineFx library can work as a client library too. Currently it implements a NetConnection oriented API (so there is no Flex ChannelSet implementation yet, which however also relies on NetConnection)
 
A good starting point would be the [FluorineFx InstallDir]\Samples\Misc\AMFCall sample (this sample connects to the [FluorineFx InstallDir]\Samples\Flex\Remoting\DataAccess as server-side application)
There is also a FluorineFx Silverlight library (the same sample for Silverlight is described here  http://blog.fluorinefx.com/?p=17 )
 
You can also try to use as you described (1) the FluorineFx.AMF3.ByteArray class and do your own socket communication (if you really want to rewrite that part in C# ?)
(2) It would be still RPC as I guess there is some kind of remote method invocation involved in that case too (you are not just sending some data without use in the server-side) but it is not what we call "Flex Remoting"
 
I recommend using FluorineFx's NetConnection API but you could use what you described at (1) too.
 
Zoli


From: fluorine-bounces@... [mailto:fluorine-bounces@...] On Behalf Of Duder Himer
Sent: Tuesday, September 01, 2009 7:56 AM
To: fluorine@...
Subject: [Fluorine] Client side AMF

I would like to port a Flex client application to C#, which connects to a server and communicates AMF formatted objects over a socket connection.  Skimming over the documentation, I am seeing alot of stuff pertaining to the serverside, but I see a few client side things, but I don't know if they pertain to what I'm trying to do.

1) Can this library be used to serialize/deserialize AMF objects in a client side C# application?  For example, this is my Flex code to serialize an object and send a command with some data:
            var messageToSend:* = new Object();
            messageToSend.cmd = cmdStr;
            messageToSend.data = objectData;
            var serializedMsg:* = new ByteArray();
            serializedMsg.writeObject(messageToSend);
            socket.writeInt(serializedMsg.length);
            socket.writeBytes(serializedMsg);
            socket.flush();

... writeObject in Flex 3, from my superificial understanding, uses the AMF format to serialize the object.  So I think I'd be in good shape if I can figure out how to serialize/deserialize these AMF objects in C#, and also what kind of decorations/restrictions there are on the C# classes that represent the objects.

2) If this can be done, can you please point me to the relevant documentation?  I am having a bit of terminology overload here while looking through the documentation.  I am a pretty experienced C# programmer, but I have only about a month of experience with Flex, and am not sure what exactly you would call what I'm trying to do.  Is it "Flex 2 Remoting"?




_______________________________________________
fluorine mailing list
fluorine@...
http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com

Re: Client side AMF

by Support-179 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
FluorineFx.ASObject (or simply IDictionary<string, object> or plain IDictionary)

 

From: fluorine-bounces@... [mailto:fluorine-bounces@...] On Behalf Of Duder Himer
Sent: Saturday, September 26, 2009 8:00 AM
To: Fluorine Mailing List
Subject: Re: [Fluorine] Client side AMF

Since:
            var messageToSend:* = new Object();
            messageToSend.cmd = cmdStr;
            messageToSend.data = objectData;
...would be an associate array with the cmd and data elements, what would that look like on the C# side?  What C# object do associative array come across as?

From: Duder Himer <websnozz@...>
To: Fluorine Mailing List <fluorine@...>
Sent: Tuesday, September 1, 2009 6:19:48 AM
Subject: Re: [Fluorine] Client side AMF

Well #1 is a snippet of the legacy code, which I am porting over.  I'd prefer the easiest method, but it will need to be equivilant.  I am messing with the NetConnection API now.  I am only guessing that the legacy code is maybe some hacked together version of RTMP since a socket is being used.


From: Support <support@...>
To: Fluorine Mailing List <fluorine@...>
Sent: Tuesday, September 1, 2009 5:58:32 AM
Subject: Re: [Fluorine] Client side AMF

The FluorineFx library can work as a client library too. Currently it implements a NetConnection oriented API (so there is no Flex ChannelSet implementation yet, which however also relies on NetConnection)
 
A good starting point would be the [FluorineFx InstallDir]\Samples\Misc\AMFCall sample (this sample connects to the [FluorineFx InstallDir]\Samples\Flex\Remoting\DataAccess as server-side application)
There is also a FluorineFx Silverlight library (the same sample for Silverlight is described here  http://blog.fluorinefx.com/?p=17 )
 
You can also try to use as you described (1) the FluorineFx.AMF3.ByteArray class and do your own socket communication (if you really want to rewrite that part in C# ?)
(2) It would be still RPC as I guess there is some kind of remote method invocation involved in that case too (you are not just sending some data without use in the server-side) but it is not what we call "Flex Remoting"
 
I recommend using FluorineFx's NetConnection API but you could use what you described at (1) too.
 
Zoli


From: fluorine-bounces@... [mailto:fluorine-bounces@...] On Behalf Of Duder Himer
Sent: Tuesday, September 01, 2009 7:56 AM
To: fluorine@...
Subject: [Fluorine] Client side AMF

I would like to port a Flex client application to C#, which connects to a server and communicates AMF formatted objects over a socket connection.  Skimming over the documentation, I am seeing alot of stuff pertaining to the serverside, but I see a few client side things, but I don't know if they pertain to what I'm trying to do.

1) Can this library be used to serialize/deserialize AMF objects in a client side C# application?  For example, this is my Flex code to serialize an object and send a command with some data:
            var messageToSend:* = new Object();
            messageToSend.cmd = cmdStr;
            messageToSend.data = objectData;
            var serializedMsg:* = new ByteArray();
            serializedMsg.writeObject(messageToSend);
            socket.writeInt(serializedMsg.length);
            socket.writeBytes(serializedMsg);
            socket.flush();

... writeObject in Flex 3, from my superificial understanding, uses the AMF format to serialize the object.  So I think I'd be in good shape if I can figure out how to serialize/deserialize these AMF objects in C#, and also what kind of decorations/restrictions there are on the C# classes that represent the objects.

2) If this can be done, can you please point me to the relevant documentation?  I am having a bit of terminology overload here while looking through the documentation.  I am a pretty experienced C# programmer, but I have only about a month of experience with Flex, and am not sure what exactly you would call what I'm trying to do.  Is it "Flex 2 Remoting"?




_______________________________________________
fluorine mailing list
fluorine@...
http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com

Fluorine Error

by Rick Chen-2 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hello,

 

My RTMP stopped working and I had to restart IIS to get it working again.

 

Here’s the last log:

 

2009-09-29 16:29:59,921 [ThreadPoolEx Thread #172] ERROR FluorineFx.Messaging.Rtmp.RtmpServerConnection - dd1aede66e05d3aa068c64cd70c95a3

System.ObjectDisposedException: Cannot access a disposed object.

Object name: 'System.Net.Sockets.NetworkStream'.

   at FluorineFx.Messaging.Rtmp.RtmpQueuedWriteStream.EndWrite(IAsyncResult asyncResult)

   at FluorineFx.Messaging.Rtmp.RtmpQueuedWriteStream.Write(Byte[] buffer, Int32 offset, Int32 count)

   at FluorineFx.Messaging.Rtmp.RtmpServerConnection.Write(Byte[] buffer)

 

Any idea why this error happened?

 

Thanks,

Rick


_______________________________________________
fluorine mailing list
fluorine@...
http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com

Re: Fluorine Error

by Support-179 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi Rick,
 
There is a fix in the SVN that should address the issue with the ObjectDisposedException (RtmpServerConnection)
I do not know however how would this stop the RTMP server (did your receive many error traces?)
 
Zoli


From: fluorine-bounces@... [mailto:fluorine-bounces@...] On Behalf Of Rick Chen
Sent: Wednesday, September 30, 2009 4:19 AM
To: Fluorine Mailing List
Subject: [Fluorine] Fluorine Error

Hello,

 

My RTMP stopped working and I had to restart IIS to get it working again.

 

Here’s the last log:

 

2009-09-29 16:29:59,921 [ThreadPoolEx Thread #172] ERROR FluorineFx.Messaging.Rtmp.RtmpServerConnection - dd1aede66e05d3aa068c64cd70c95a3

System.ObjectDisposedException: Cannot access a disposed object.

Object name: 'System.Net.Sockets.NetworkStream'.

   at FluorineFx.Messaging.Rtmp.RtmpQueuedWriteStream.EndWrite(IAsyncResult asyncResult)

   at FluorineFx.Messaging.Rtmp.RtmpQueuedWriteStream.Write(Byte[] buffer, Int32 offset, Int32 count)

   at FluorineFx.Messaging.Rtmp.RtmpServerConnection.Write(Byte[] buffer)

 

Any idea why this error happened?

 

Thanks,

Rick


_______________________________________________
fluorine mailing list
fluorine@...
http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com

Re: Fluorine Error

by Rick Chen-2 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hi Zoli,

 

I checked my log and found other errors that might crashed the entire application. I saw the start log on Fluorine. This might be the culprit.

 

I’ll update the SVN to fix this problem.

 

Thanks,

Rick

 

From: fluorine-bounces@... [mailto:fluorine-bounces@...] On Behalf Of Support
Sent: Wednesday, September 30, 2009 10:09 AM
To: 'Fluorine Mailing List'
Subject: Re: [Fluorine] Fluorine Error

 

Hi Rick,

 

There is a fix in the SVN that should address the issue with the ObjectDisposedException (RtmpServerConnection)

I do not know however how would this stop the RTMP server (did your receive many error traces?)

 

Zoli

 


From: fluorine-bounces@... [mailto:fluorine-bounces@...] On Behalf Of Rick Chen
Sent: Wednesday, September 30, 2009 4:19 AM
To: Fluorine Mailing List
Subject: [Fluorine] Fluorine Error

Hello,

 

My RTMP stopped working and I had to restart IIS to get it working again.

 

Here’s the last log:

 

2009-09-29 16:29:59,921 [ThreadPoolEx Thread #172] ERROR FluorineFx.Messaging.Rtmp.RtmpServerConnection - dd1aede66e05d3aa068c64cd70c95a3

System.ObjectDisposedException: Cannot access a disposed object.

Object name: 'System.Net.Sockets.NetworkStream'.

   at FluorineFx.Messaging.Rtmp.RtmpQueuedWriteStream.EndWrite(IAsyncResult asyncResult)

   at FluorineFx.Messaging.Rtmp.RtmpQueuedWriteStream.Write(Byte[] buffer, Int32 offset, Int32 count)

   at FluorineFx.Messaging.Rtmp.RtmpServerConnection.Write(Byte[] buffer)

 

Any idea why this error happened?

 

Thanks,

Rick


_______________________________________________
fluorine mailing list
fluorine@...
http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com