def _read_header(socket):
data = read_exactly(socket, <NUM_LIT:8>)<EOL>return struct.unpack('<STR_LIT>', data)<EOL>
Reads the header from socket stream to determine the size of next frame to read. Header is 8 bytes long, where
the first byte is the stream type and last four bytes (bigendian) is size of the payload

    header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}

Parameters
----------
socket
    Socket to read the responses from

Returns
-------
int
    Type of the frame
int
    Size of the payload