Beginner OpenCV issue

So am I wrong in assuming that

connection.recv(imgBufferSize)

will not block until all ‘imgBufferSize’ bytes are read ?

If that is true, then that explains part of my issue.

To clarify after using
nparr = np.frombuffer(connection.recv(imgBufferSize), dtype="uint8")

I received this error :
File “.\tcp_test.py”, line 31, in

    image = Image.frombuffer('RGBA', (imgWidth,imgHeight), nparr)

  File "C:\Python38\lib\site-packages\PIL\Image.py", line 2729, in frombuffer

    im = im._new(core.map_buffer(data, size, decoder_name, 0, args))

ValueError: buffer is not large enough  

If you think this is the root my issue, can you please share how I do need to be reading that socket data ?

Thank you