@staticmethod
def pack_message(fin, code, mask, rsv1=0, rsv2=0, rsv3=0):
    """Converting message into data frames
        conversion rule reference document:
        https://tools.ietf.org/html/rfc6455#section-5.2
        """
    head1 = (128 if fin else 0) | (64 if rsv1 else 0) | (32 if rsv2 else 0) | (
        16 if rsv3 else 0) | code
    head2 = 128 if mask else 0
    return head1, head2
