views:

112

answers:

1

Hi,

I've built a application that communicates with Coldfusion cfc functions via Remoting. I've noticed that the NetConnection object disconnects after each call, is this expected behaviour? For some reason I was expecting the NetConnection object to stay connected until I closed it myself (I'm making about 1 request per second and had planned for it to stay open).

+2  A: 

If you're using an HTTP connection, it will not be persistent, but if you're using RTMP, it should be persistent. Check the connected property.

http://livedocs.adobe.com/flex/3/langref/flash/net/NetConnection.html#connected

If you're using RTMP, I'd check to see if the server side code is terminating the connection.

Phil Hayward