Changeset 1fb7060 in ammosreader
- Timestamp:
- 05/28/23 11:51:46 (2 years ago)
- Branches:
- AmmosSource
- Children:
- 1de11fa
- Parents:
- 82f4e7d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ammosreader/AmmosSocketSource.py
r82f4e7d r1fb7060 12 12 def read_bytes(self, bytes_to_read): 13 13 byte_array = [] 14 14 logger.info("Start reading bytes from socket") 15 15 try: 16 16 while len(b''.join(byte_array)) < bytes_to_read: … … 23 23 logger.info("Got %s bytes of %s remaining", len(new_bytes), bytes_to_read - len(b''.join(byte_array))) 24 24 byte_array.append(new_bytes) 25 print(byte_array) 25 26 except TimeoutError: 27 logger.info("Timeout error while reading from socket") 26 28 return None 27 29 return b''.join(byte_array)
Note:
See TracChangeset
for help on using the changeset viewer.