working socket; handle shutdown