Skip to main content
User Unknow
Legend
April 29, 2013
Question

iOS and Socket - why don't work?

  • April 29, 2013
  • 1 reply
  • 2203 views

Hi,

Who know why socket on iOS Air don't work? It's prefect on PC but not on iOS

iOS result me Error 2031. I want to connect from iOS socket to my wifi 192.168.1.42 with 7840 port.

local connection between two air apps is ok

This topic has been closed for replies.

1 reply

Adobe Employee
April 30, 2013

Hi,

Could you please try a socket application on Win/Mac(with a Wifi) and see if it connects to the server.

-Nimit

User Unknow
Legend
April 30, 2013

Could I sent you files so you can check they? I can't figureout. On old Air this was worked. If I create ServerSocket with 127.0.0.1 and connect from Socket to 127.0.0.1 using the same PC - this works prefectly. But if I trying to connect from PC A to PC B this not work. (ServerSocket with 127.0.0.1 and Client Socket with 192.168.1.42)

But There is no any issues with WiFi I think. I have local network server - it's work. I can reach this server from any PC that connected to my WiFi. I can see this server from any device from the same WiFi net.

But if I create on PC A - ServerSocket and try to connect to it from PC B using Socket - this not help. #2031 error appear each time.

Firstly I think this is some policy file issue. But I don't think so - PC A don't receive any connection from Client Adobe Air app so I can check something.

Maybe there some issues with ServerSocket because I can use Socket for POP3/SMTP from Adobe Air....

Inspiring
May 8, 2013

Hi David,

Binding to 0.0.0.0 means binding to all available interfaces/addresses to that machine where as binding to 127.0.0.1 means binding to the loopback interface. The loopback interface should ideally not receive any connection requests from outside but only the local connection directly specifically to 127.0.0.1.

Regards,

Nimit


Thanks Nimit,

Yes - this is what I was trying to explain (perhaps poorly) to the original poster, who in reply #2 said:

" If I create ServerSocket with 127.0.0.1 and connect from Socket to 127.0.0.1 using the same PC - this works prefectly. But if I trying to connect from PC A to PC B this not work. (ServerSocket with 127.0.0.1 and Client Socket with 192.168.1.42)"

Clearly the problem in this case is that the ServerSocket on PC B needs to be bound to a non-localhost interface address (or 0.0.0.0) in order for PC A to be able to connect to it.

Cheers,

Dave