Not clear to me that you need a closeSocket_ and a close. Why not just put code from closeSocket in here, and make all calls go to close?