'Serialize the frame to wire format. Returns a string.'

def __bytes__(self):

    b = bytes(self.header)
    if self.header.masking_key:
        b += Masker(self.header.masking_key)(self.payload)
    else:
        b += self.payload
    return b
