'Wrapper for receiving data to parse the WebSocket frame format'

def receive_frame(self):

    while True:
        header = self._recv(2)
        if (not header):
            return None
        if ((ord_func(header[1]) & 127) > 0):
            return self._recv((ord_func(header[1]) & 127))
