add entry point for closing tcp socket, a bit of lint work