Skip to main content
July 3, 2011
Question

Multiplayer / Sockets

  • July 3, 2011
  • 1 reply
  • 1486 views

Hi

i want to add a multiplayer feature to my app. For this - i need to open a socket for "listening" (or any other solution) so one device will act as the host.

Cant find any way to do this in Flash. Is it really missing?

This topic has been closed for replies.

1 reply

Participating Frequently
July 3, 2011

Hi,

there is new api added in 2.0 for "server" type of sockets:

http://www.adobe.com/devnet/air/flex/articles/creating_socket_server.html

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/ServerSocket.html

But note that is not supported on mobile devices as per 2.0 documentation: what does this mean in context of latest 2.5 or later I don't know. You could check on device with ServerSocket.isSupported static property

regards,

Peter

July 4, 2011

nope, it returns false on my iPhone. even with adobe air 2.7.

so - this means there's no way to implement p2p btw two iphones with AIR?

this sucks!

July 5, 2011

I'm pretty sure I've got a working example with Cirrus and iOS at home. At least I'm sure that Android does support it (as I'm remote controlling my PC via P2P and my Android) but I think I've tested that once on my iPhone as well. I'll have a look and let you know.