Crossplatform NetConnection: does it exist?

Is there any finished crossplatform implementation of NetConnection?
I’m particularly interested in NetConnection.call

I know that there are some native libs for js and curl, and that there’s half-implemented amf support in format lib which can be used to implement AMF messages, but that’s too complicated.

There’s Loader, URLLoader and Socket, NetConnection would require AMF support, right? HxScout has AMF support that might be MIT and possible to (either) extend in the format lib or something we could/should include in OpenFL

Are you trying to talk a Flash Media Server, or something else?

It’s talking to “fluorine” .net lib. The api is already used by many flash applications, so if I want to make a client app in haxe, i’ll need to support it from my side.

I know that it’s possible to implement it manually, but it requires significant effort.

  1. ‘format’ lib does not support externalized objects like ArrayCollection, and it’s hard to use and extend it since it uses enums too much. Actually, it can’t be extended without changing the original sources. And existing IExternalizable interface is not compatible with format lib since it requires IDataInput while format lib uses Input
  2. ‘format’ lib does not support references
  3. Http support. I don’t know if URLLoader and Socket are good enough, but haxe’s Http requires data as String, not as Bytes, and encoded AMF message definitely contains some \0 chars, so it just truncates the message. Also it’s confusing that each lib has its own implementation of http requests. Should I use haxe, lime, openfl or maybe even something else?
  4. keep-alive headers and authorization. I don’t know how the cookies and headers are handled by flash player, and simulating it may be hard
  5. AMF message format requires some meta about target methods on server, request/response index, probably some headers, and can send several requests in single message. It’s not hard to implement a simple encoder which does not care about headers or multiple requests and indices, but it’s definitely not supported by ‘format’ lib at all
  6. amf0 has a code which says ‘switch to amf3’, and ‘format’ lib also does not handle that
  7. it may be more reasonable to wrap existing implementations of amf remoting for some platforms. I’ve heard that c++ and javascript have some libs for that.

Also it’s hard to believe and understand why it was not implemented during all the years of haxe’s existance.