how to terminate connection on a port in mac code example Example: how to close a port mac sudo lsof -i :5955