Reputation: 1303
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.
Upvotes: 11
Views: 8092
Reputation: 19
This just means that the connection failed, because the host could not be found / resolved. Make sure your websocket server is running and accessible for incoming connections. And check if the socket only listening for local ips.
Upvotes: 0
Reputation: 20236
Could be any number of issues here, but the important things to check include:
RST
back to the client (thus simulating a connection refused);I'll update my answer when you post code if relevant.
Upvotes: 1