Added and tested sockets functionality to AppDelegate