'read a WebSocket frame sent by a server or client
fp is a "file like" object that could be backed by a network
stream or a disk or an in memory stream reader'

@classmethod
def from_file(cls, fp):

    header = FrameHeader.from_file(fp)
    payload = fp.safe_read(header.payload_length)
    if ((header.mask == 1) and header.masking_key):
        payload = Masker(header.masking_key)(payload)
    frame = cls(payload)
    frame.header = header
    return frame
