Added code to get sockets from client