def _read_packet(self):
        try:
            header = readall(self._transport, _header.size)
        except TimeoutError:
            self._session._put_cancel()
            raise
        self._pos = 0
        self._type, self._status, self._size, self._session._spid, _ = _header.unpack(header)
        self._have = _header.size
        assert self._size > self._have, 'Empty packet doesn make any sense'
        self._buf = self._transport.read(self._size - self._have)
        self._have += len(self._buf)
Reads next TDS packet from the underlying transport
dataset/ETHPy150Open denisenkom/pytds/pytds/tds.py/_TdsReader._read_packet