Created listening socket
Separated select() from read or accept()
Now it breaks the json array into objects