@classmethod
    def _socket_read(cls, wait=False):
        if wait:
                data = ""
                while len(data) == 0:
                    try:
                        data = cls._socket.recv(4096)
                    except socket.timeout:
                        pass
                    except OSError as err:
                        return False, 'Failure to read from socket: {}'.format(err)

                cls._parse_socket_data(data)
                return True, None

        try:
            data = cls._socket.recv(4096)
            cls._parse_socket_data(data)
            return True, None
        except socket.timeout:
            return None, 'No data'
        except OSError as err:
            return False, 'Failure to read from socket: {}'.format(err)
Read from socket. Does not fail on low timeout - only returns None.
dataset/ETHPy150Open f4ble/pyarc/ark/steam/steam_socket_core.py/SteamSocketCore._socket_read