Can my app use ServerSocket capabilities if it's running on a version of AIR < 2.5?
In our AIR app, we are using class ServerSocket
to listen for connections on a specific port. According to the docs, this is available from AIR 2.0 onwards. The event that we need to listen to in order to behave like a server is ServerSocketConnectEvent
, which is also available since AIR 2.0. There are several examples of this online, tutorials etc.
The problem is that the former class is available in Flex SDK 4.0, while the event itself exists only from Flex SDK 4.1 onwards. That means that our runtime needs to be AIR 2.5 or above. On our target machine (Linux Red Hat Enterprise Linux Server release 5.5) we could only install AIR 2.0 (there are problems with dependencies on glibc so we can't upgrade to AIR 2.5).
Is there any error on those release docs and tutorials when they say all these features are available since AIR 2.0? My impression is that the ability to work as a server, listening on a socket, is only available from 2.5 onwards.
If so, is there a way we could benefit from those new features, even if our runtime is 2.0? i.e. embedding those SWC (ServerSocketConnectEvent
) from the AIR SDK 2.5 within 开发者_如何学Goour application?
That makes no sense. ServerSocketConnectEvent is not part of the Flex SDK, it's part of the Air SDK, and the api says it's been around since Air 2.
I think your problem is just with your project setup. It should be possible to use Flex 4 with Air 2.0 and use that class. Make sure you're pointing to the proper Air SDK and it should work. Plus, Flex 4.1 is compatible with Air 2.0...
精彩评论