def ping(data_type, event_type, ping_data=None):
    """
    Construct a 'PING' message to send either a 'PING_REQUEST' or 'PING_RESPONSE' to the server.
    :param data_type: int the RTMP datatype.
    :param event_type: int the type of message you want to send (PING_REQUEST = 6 or PING_RESPONSE = 7).
    :param ping_data: bytes the data you want to send to the server (DEFAULT: blank bytes.)
    """
    if ping_data is None:
        ping_data = b"\x00\x00\x00\x00"

    msg = {'msg': data_type,
           'event_type': event_type,
           'event_data': ping_data}
    return msg