def socket_recvall(socket, length, bufsize=<NUM_LIT>):
data = b"<STR_LIT>"<EOL>while len(data) < length:<EOL><INDENT>data += socket.recv(bufsize)<EOL><DEDENT>return data<EOL>
A helper method to read of bytes from a socket to a maximum length