delete sockets code