How to use the imjoy.imjoySocketIO_client.symmetries.get_byte function in imjoy

To help you get started, we’ve selected a few imjoy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github oeway / ImJoy-Engine / imjoy / imjoySocketIO_client / parsers.py View on Github external
def _read_packet_length(content, content_index):
    while get_byte(content, content_index) not in [0, 1]:
        content_index += 1
    content_index += 1
    packet_length_string = ""
    byte = get_byte(content, content_index)
    while byte != 255:
        packet_length_string += str(byte)
        content_index += 1
        byte = get_byte(content, content_index)
    return content_index, int(packet_length_string)
github oeway / ImJoy-Engine / imjoy / imjoySocketIO_client / parsers.py View on Github external
def _read_packet_text(content, content_index, packet_length):
    while get_byte(content, content_index) == 255:
        content_index += 1
    packet_text = content[content_index : content_index + packet_length]
    return content_index + packet_length, packet_text
github oeway / ImJoy-Engine / imjoy / imjoySocketIO_client / parsers.py View on Github external
def _read_packet_length(content, content_index):
    while get_byte(content, content_index) not in [0, 1]:
        content_index += 1
    content_index += 1
    packet_length_string = ""
    byte = get_byte(content, content_index)
    while byte != 255:
        packet_length_string += str(byte)
        content_index += 1
        byte = get_byte(content, content_index)
    return content_index, int(packet_length_string)