You can try GCDAsyncSocket . You will need to change your socket connections. In the file HTTPServer.m in all examples you will find:
// By default bind on all available interfaces, en1, wifi etc interface = @"192.168.2.1"; // Use a default port of 0 // This will allow the kernel to automatically pick an open port for us port = 40000;
You can set the interface to either en0, en1, etc., or directly, using the IP address of the interface, as in the above example. I hope I will be helpful.
source share