close tcp sockets