add the code of sockets