2

I want to make the socket rocket work with ip address instead of host name

I am using Socket Rocket Visit https://github.com/square/SocketRocket#readme to create real time application on iPhone/ipad ,the library works fine if i use host name , but it doesn't work if i use ip address instead of host name (i get the ip by ping my web server host name)

Tried to resolve ip address to its host name but nothing.

  • Can you share the host name and IP you are using? – TorukMakto Dec 05 '13 at 07:50
  • i used a generic one exist in this web site http://www.websocket.org/echo.html , the host name is ws://echo.websocket.org and the ip retrieved by ping the host name – user3069124 Dec 05 '13 at 08:25
  • Host name is the right way to use.. If you have IP then you have to use it as ws://xxx.xxx.xxx.xxx and it should work.. – TorukMakto Dec 05 '13 at 08:31
  • if you check the site websocket.org/echo.html , and try to replace the host name "ws://echo.websocket.org" with ip "ws://174.129.224.73" it will not work :( , and the same happen in IOS – user3069124 Dec 05 '13 at 08:41

1 Answers1

0

here is the solution , i used the library "GCDAsyncSocket" it works fine and smooth