Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error Domain=NSPOSIXErrorDomain Code=61 "The operation couldn\u2019t be completed. Connection refused"

Tags:

ios

sockets

I am using asyncSocket as client side, aim running my application on iPhone simulator, and the server side coded with C#. its working perfectly if i try to connect with a server on my LAN but the connection refused with the server out of my LAN.

I'am sure that the same server is working with another client code done on C#.

And this the message i get from socket Error:

>Error Domain=NSPOSIXErrorDomain Code=61 "The operation couldn\u2019t be completed. Connection refused"

Knowing that i get this message on connect phase before try to send data to server.

Any helping idea is appreciated.

like image 446
Mohammad Shraim Avatar asked Feb 23 '12 22:02

Mohammad Shraim


1 Answers

Could be any number of issues here, but the important things to check include:

  • Firewalls that may be restricting incoming access and sending RST back to the client (thus simulating a connection refused);
  • DNS resolves to the same names from both locations where it works and where it doesn't
  • Posting code so we can look at your asyncsocket flow.

I'll update my answer when you post code if relevant.

like image 60
jer Avatar answered Oct 13 '22 00:10

jer