Working on example using sockets