Local and remote addresses and closing sockets