Use socket.read() for ignore_data
Fix style issues.