Implement Listen and Close.