tcp_address_to_file(+ServerFile, +Address)

This predicate writes the address term Address to the file ServerFile. This is useful when creating a listener on a dynamic port to enable clients to find out the server address by using the complementary predicate tcp_address_from_file/2.